How to get only header or column names alone in Output file

Four Stars

How to get only header or column names alone in Output file

Hi,

 

I have a scenario where i want to read data from DB table  and put the  column headers of the Table alone in the output file.

 

I have below components used.

 

tMSSQLInput(Dynamic data Type) --- tfileoutputdelimited 

 

But When i process this, I'm getting headers and also data from the table, I dont want data from the table, I just want to read the columns present in the table and print in an Output file.

 

Thanks for your help.

Mahesh.

 

Six Stars

Re: How to get only header or column names alone in Output file

why don't you hit the system table and get the column information,

SELECT COLUMN_NAME,*
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'YourTableName' AND TABLE_SCHEMA='YourSchemaName'