SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 single quote
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ramuu
Starting Member

7 Posts

Posted - 05/16/2013 :  07:00:14  Show Profile  Reply with Quote
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...

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1050 Posts

Posted - 05/16/2013 :  07:13:54  Show Profile  Reply with Quote
I see the signle qoute in the output (you said you're getting) at the end.. are you looking for double qoutes?

Cheers
MIK
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 05/16/2013 :  07:23:11  Show Profile  Reply with Quote

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


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

vijays3
Constraint Violating Yak Guru

India
338 Posts

Posted - 05/16/2013 :  07:23:17  Show Profile  Reply with Quote
try this


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


Vijay is here to learn something from you guys.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 05/16/2013 :  07:25:29  Show Profile  Reply with Quote
also see

http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000