|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Loop through table using column id instead of nameI need to generate a comma delimited file that is a copy of a row in a table.
I would like to be able to use the column id instead of the column name to do this. i would like to be able to pass a table name to the stored procedure and not have to have the column names hard coded. Is this even possible? I know it is possible to do in C++ or VB, but can it be done as a stored procedure. Thanks for your help, Ken It seems to me it's much more efficient to do it in the calling application.
String and file handling isn't T-SQL's strong suit. Ken Holzer wrote: Show quote > I need to generate a comma delimited file that is a copy of a row in a table. > I would like to be able to use the column id instead of the column name to do > this. i would like to be able to pass a table name to the stored procedure > and not have to have the column names hard coded. > > Is this even possible? > > I know it is possible to do in C++ or VB, but can it be done as a stored > procedure. > > Thanks for your help, > > Ken |
|||||||||||||||||||||||