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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Information Schema data in a query...

Status
Not open for further replies.

silicongelica

Programmer
Dec 12, 2000
7
US
Table2 contains no real data, but has been created with the column names that are the list of columns that I want to select in a query for Table1. How do I write that into a query?
I found sp_columns, and that nicely spits out the column info for Table2, but I need to find a way to query the information schema and write that right into the query....

Select ((Table2 List of columns))
from Table1

Can anyone help me figure this out?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top