Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

single quote issue Expand / Collapse
Author
Message
Posted Thursday, May 16, 2013 5:05 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 9, 2014 11:00 PM
Points: 18, Visits: 156
Hi all,
I have to update a column where I am giving query which is

Update Table Set col = '[189] IS NOT NULL and [189] <> ''' Where colid= 198

but its giving output:- [189] IS NOT NULL and [189] <> '


But I want output :- [189] IS NOT NULL and [189] <> ''

actually I am not getting single quotes at last..


Please let me know how to give update query?
Thanks in advance...
Post #1453424
Posted Thursday, May 16, 2013 5:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 27, 2014 8:46 AM
Points: 7, Visits: 58
Hi,

Try this.

Add 2 more single quotes in your statement.

select '[189] IS NOT NULL and [189] <> '''''
Post #1453430
Posted Thursday, May 16, 2013 5:23 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 9, 2014 11:00 PM
Points: 18, Visits: 156
Thanks for your quick reply....It works exactly as I wanted.. Thank you very much
Post #1453436
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse