Avatar of Tech315
Tech315 asked on

TSQL HELP

Ladies, Gentleman, need some help with the following code below

declare   @li_severity int, @lvc_errmsg varchar(255)

BEGIN TRANSACTION

update  ta_complaint_narrative
set incident_narration = ''
where complaint_id in 
( select complaint_id
  from ta_complaint
  where stage_id <> 0 
    and activity_id <> 0
)
if @@error <> 0 
begin 
    select @li_severity = 16,  
    @lvc_errmsg =  'Cannot set set incident_narration = '' '
     goto error 
end 
COMMIT
if @@error <> 0 
begin 
   select @li_severity = 16, 
          @lvc_errmsg =  'Cannot commit changes in ta_complaint_narrative'
   goto error 
end    

return 

/*  Errors handling  */ 
error: 
  rollback 
  raiserror (@lvc_errmsg, @li_severity, 1) 
GO

Open in new window


this part of the code set incident_narration = ''
was changed to set it to be empty. but I would like it not to be empty and stumped on what I need to put in there. I was thinking * but i dont think that it is it.

Any ideas?

Thanks

T
Microsoft SQL ServerMicrosoft SQL Server 2008Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Tech315

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jim Horn

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Scott Pletcher

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
PortletPaul

':('
'grrrr'
'-'
'not provided'
'unavailable'
'empty'
'void'

http://thesaurus.com/browse/empty
bare
barren
blank
deserted
desolate
devoid
dry
hollow
unfilled
uninhabited
unoccupied
vacant
abandoned
clear
dead
deflated
depleted
desert
despoiled
evacuated
exhausted
forsaken
lacking
vacated
void
wanting
waste
destitute
godforsaken
unfurnished
vacuous

'you tell us' and '42' I quite like too; 'none' has a nice ironic ring to it

sorry, about the flippancy, but you did ask for any ideas
ASKER
Tech315

Ok, sorry for the ambiguity of my question. The code above is deleting one of the columns, the narrative column, and was looking for that not to happen .
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Tech315

Experts thanks for the taking the time out to address my question, sorry was out sick with shingles, and one of the guys from work removed the code. So I'm splitting the points for effort.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23