Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6062747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:05:14+00:00 2026-05-23T09:05:14+00:00

I have the following stored procedure. Whenever @Logo is null, the current value is

  • 0

I have the following stored procedure.

Whenever @Logo is null, the current value is erased. I’d like to not update the value for Logo if @Logo is NULL.

IF OBJECT_ID ('kii.p_UpdateDocumentStyle') IS NOT NULL
   DROP PROCEDURE kii.p_UpdateDocumentStyle
GO

CREATE PROCEDURE kii.p_UpdateDocumentStyle
   @DocumentId AS INT,
   @TitleForegroundColor AS NVARCHAR(10),
   @TitleBackgroundColor AS NVARCHAR(10),
   @TitleFontFamily AS NVARCHAR(50),
   @TitleFontSize AS NVARCHAR(10),
   @TitleFontStyle AS NVARCHAR(10),
   @TitleFontWeight AS NVARCHAR(10),
   @TitleTextDecoration AS NVARCHAR(15),
   @SectionTitleForegroundColor AS NVARCHAR(10),
   @SectionTitleBackgroundColor AS NVARCHAR(10),
   @SectionTitleFontFamily AS NVARCHAR(50),
   @SectionTitleFontSize AS NVARCHAR(10),
   @SectionTitleFontStyle AS NVARCHAR(10),
   @SectionTitleFontWeight AS NVARCHAR(10),
   @SectionTitleTextDecoration AS NVARCHAR(15),
   @ParagraphForegroundColor AS NVARCHAR(10),
   @ParagraphBackgroundColor AS NVARCHAR(10),
   @ParagraphFontFamily AS NVARCHAR(50),
   @ParagraphFontSize AS NVARCHAR(10),
   @ParagraphFontStyle AS NVARCHAR(10),
   @ParagraphFontWeight AS NVARCHAR(10),
   @ParagraphTextDecoration AS NVARCHAR(15),
   @Logo AS Image = NULL
AS

UPDATE kii.DocumentStyle
SET 
    TitleForegroundColor = @TitleForegroundColor,           
    TitleBackgroundColor = @TitleBackgroundColor,           
    TitleFontFamily = @TitleFontFamily,             
    TitleFontSize = @TitleFontSize,                 
    TitleFontStyle = @TitleFontStyle,                   
    TitleFontWeight = @TitleFontWeight,             
    TitleTextDecoration = @TitleTextDecoration,         
    SectionTitleForegroundColor = @SectionTitleForegroundColor, 
    SectionTitleBackgroundColor = @SectionTitleBackgroundColor, 
    SectionTitleFontFamily = @SectionTitleFontFamily,           
    SectionTitleFontSize = @SectionTitleFontSize,           
    SectionTitleFontStyle = @SectionTitleFontStyle,         
    SectionTitleFontWeight = @SectionTitleFontWeight,           
    SectionTitleTextDecoration = @SectionTitleTextDecoration,       
    ParagraphForegroundColor = @ParagraphForegroundColor,       
    ParagraphBackgroundColor = @ParagraphBackgroundColor,       
    ParagraphFontFamily = @ParagraphFontFamily,         
    ParagraphFontSize = @ParagraphFontSize,             
    ParagraphFontStyle = @ParagraphFontStyle,               
    ParagraphFontWeight = @ParagraphFontWeight,         
    ParagraphTextDecoration = @ParagraphTextDecoration,     
    Logo = @Logo                            
WHERE
    DocumentId = @DocumentId
GO

GRANT EXECUTE on kii.p_UpdateDocumentStyle TO p_role_kii
GO
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:05:15+00:00Added an answer on May 23, 2026 at 9:05 am

    Amend your line to this

    Logo = COALESCE(@logo, Logo)
    

    COALESCE will assign a value to Logo that is: @logo if it was populated, otherwise it assigns the existing value of Logo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to do the following. Basically have a stored procedure call another
I have created the following stored procedure.. CREATE PROCEDURE [dbo].[UDSPRBHPRIMBUSTYPESTARTUP] ( @CODE CHAR(5) ,
We have the following simple Stored Procedure that runs as an overnight SQL server
I have a stored procedure with the following header: FUNCTION SaveShipment (p_user_id IN INTEGER,
I have the following 3 rails classes, which are all stored in one table,
I have a database where I store objects. I have the following (simplified) schema
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following string String str = replace :) :) with some other string;
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I have following situation. A main table and many other tables linked together with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.