Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!! Column names form a query 1

Status
Not open for further replies.

sto

Programmer
Nov 26, 2001
14
US
Is there a way to return the column names from a dynamic query?
 
What do you mean?

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Did you mean this:

select *
from information_schema.columns
where TABLE_CATALOG = 'yourdatabasename'

-VJ
 
I am building a stored procedure to produces canned email with form letters. I want the to be dynamic enough that I can use this in other areas of the database. So the recordset will be dynamic. Because of this I need to extract the field names from a select statement so I can use it to build a letter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top