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 2000 Forums
 SQL Server Development (2000)
 Single quotes in computed column

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-07-12 : 11:16:34
Lorna writes "I have the need to create a computed column that will look like this: 'sBASETAG'

The closest that I can come is:

Formula --> '"' + [sBASETAG] + '"'

which generates: "sBASETAG"

That is close, but will not do what I need it to do.

Can someone plese help me."

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-12 : 11:26:40
Formula --> '''' + [sBASETAG] + ''''


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2006-07-12 : 11:27:26
try
''' + [sBASETAG] +'''

Thats 3 single quotes each side

EDIT: oops. that puts your column name in single quotes, not the value of the column. DUH

Nigel got it

Help us help YOU!
Read this blog entry for more details: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx

*need more coffee*
SELECT * FROM Users WHERE CLUE > 0
(0 row(s) affected)
Go to Top of Page
   

- Advertisement -