views:

46

answers:

2

I want to select some values from a table . I want a text output . Now what iam doing is iam writing a procedure to convert the selected values into text . But its really time consuming . Is there anythng , means any system functions or sp's in SQL to implement this....?

+1  A: 

Do you mean something like CAST(MyCol as varchar(50)) ?

Mitch Wheat
Or CONVERT(nvarchar(50), MyCol)
Randolph Potter
I prefer how CAST scans
Mitch Wheat
...as in the English 'scans' not table scans!
Mitch Wheat
A: 

Or something like this select CAST('some test string' AS ntext) Microsoft has a graph of valid casts in sql-server at http://msdn.microsoft.com/en-us/library/ms187928.aspx

Jo Erlandsen