getting a text list of all fields to use in a query

[expired user #3694]'s profile image [expired user #3694] posted 14 years ago in General Permalink
Greetings,

I have a table with hundreds of fields...almost 500. I need to do a query to select maybe 200 of those fields. Using HS, is there a way to get a text list of all fields in a table?

Thanks!
[expired user #3694]'s profile image [expired user #3694] posted 14 years ago Permalink
OK, did it this way. Used the CREATE sql from HS, copied, and pasted into text editor. Use the text editor's Search-and-Replace to delete most of the field type stuff, deleted tick marks, etc. Then used the text editor's macro facility to add commas to the end of each field. When complete, all I had to do was scoop up column names from text editor and paste into a SELECT query. Took about 15 minutes.

Actually, there were only 369 columns in the table smile

But the question remains, is there a way to export the field list to a text or CSV format?

Thanks!
ansgar's profile image ansgar posted 14 years ago Permalink

Using HS, is there a way to get a text list of all fields in a table?



You can select the table, go to the query tab, select all columns via mouse in the right columns list and drag them into the query editor.
[expired user #3694]'s profile image [expired user #3694] posted 14 years ago Permalink
Wow, that is definitely easier! I tried "copying" the fields in the query tab, but I didn't attempt to drag them. This way, the commas are already there, ready for the completion of the query.

Thanks for the tip!happy

Please login to leave a reply, or register at first.