Columns name from ODBC as data
Moderators: chulett, rschirm, roy
Columns name from ODBC as data
Is it possible to catch columns names from SQL querry by ODBC stage and put it i.e. to a file??
LUK
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
If what you want are the column names from a particular table and stream this as data to a target then you could use a query like the following to select a list of column names -
Make sure you are connecting to the correct database for what you are doing and replace TABLE_NAME with the table you want or leave out the WHERE and it will return all columns.
Code: Select all
select COLUMN_NAME from information_schema.columns
where table_name = 'TABLE_NAME'
Mike Hester
mhester@petra-ps.com
mhester@petra-ps.com
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Sainath - solution is already posted. mhester gave it!!!Can you post the solution you have successfully implemented so any future search for similar requirements can make use of it.
Code: Select all
elect COLUMN_NAME from information_schema.columns
where table_name = 'TABLE_NAME'
LUK