Using a String as Part of a SELECT Statement

Question:
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.

Answer:
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.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: