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
 Run Column Text Query

Author  Topic 

Monib
Starting Member

11 Posts

Posted - 2014-04-07 : 03:08:16
Hi, How to run a query that is in the column as text? plz help

Monib

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-04-07 : 09:00:06
quote:
Originally posted by Monib

Hi, How to run a query that is in the column as text? plz help

Monib

I am not quite following what you are asking. You would query text columns just like any other column:
Select 
yourtextcol1,
yourtextcol2,
yourothercolumns
from
yourTable;
If you are asking how to manipulate a text column and if you are getting an error that you cannot do whatever you are trying to do on a text column, cast it as varchar(max). For example
select len(cast(yourTextColumn as varchar(max)))
from YourTable;
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2014-04-07 : 09:13:49
quote:
Originally posted by Monib

Hi, How to run a query that is in the column as text? plz help

Monib


What type of query are you trying to run?

Madhivanan

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

- Advertisement -