Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL Server
Expertise: Beginner
Nov 30, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using a String as Part of a SELECT Statement

Can I take a string that is held in a table and use it as part of a SELECT statement?

I need to do this because I have a query that has been generated dynamically from a Web page and it has created a SELECT statement in a strange format. Due to the odd formatting it has been held as a string in a table. I have cleaned the string up and the result is held in a varchar column. I now want to use this cleaned-up version as part of a new SELECT statement.

Yes, you can do this. Just execute a SELECT statement with text that's either a constant written into the statement or text retrieved from your varchar column.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date