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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Database with Column with quotes

Author  Topic 

pdset
Constraint Violating Yak Guru

310 Posts

Posted - 2011-06-10 : 03:15:03
I have in my database a column having value like Quotient for 9's and while selecting the data using this value how I need to select.

may be silly question but I tried with Double quotes to that like
Select
"Quotient for 9's' from tab


Single Quotes

Select
'Quotient for 9's' from tab


Thanks All

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-06-10 : 03:22:54
[code]
Select [Quotient for 9's]
from tab
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

pdset
Constraint Violating Yak Guru

310 Posts

Posted - 2011-06-13 : 19:33:13
Sorry It was not working that way!!!!!!!!

I need to change this DATA Part which is like 'Quotient for 9's'.

Which means

UPDATE tab
SET TYPECODE = 'TYPICAL'
WHERE TYPECODE = [Quotient for 9's]

The problem lies in the WHERE TYPECODE = [Quotient for 9's]

Any help please. Many Thanks.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-06-13 : 19:35:47
[code]
WHERE TYPECODE = 'Quotient for 9''s'
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

pdset
Constraint Violating Yak Guru

310 Posts

Posted - 2011-06-16 : 21:09:16
Thanks It worked otherway around
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-06-20 : 12:33:38
Also refer this
http://beyondrelational.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -