troubleshooting Question

TSQL HELP

Avatar of Tech315
Tech315 asked on
Microsoft SQL ServerMicrosoft SQL Server 2005Microsoft SQL Server 2008
6 Comments1 Solution331 ViewsLast Modified:
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

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
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros