Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 single quote

Author  Topic 

ramuu
Starting Member

7 Posts

Posted - 2013-05-16 : 07:00:14
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
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2013-05-16 : 07:13:54
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

52326 Posts

Posted - 2013-05-16 : 07:23:11
[code]
Update Table Set col = '[189] IS NOT NULL and [189] <> ''''' Where colid= 198
[/code]

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

vijays3
Constraint Violating Yak Guru

354 Posts

Posted - 2013-05-16 : 07:23:17
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

52326 Posts

Posted - 2013-05-16 : 07:25:29
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
   

- Advertisement -