distal-attribute
distal-attribute
distal-attribute
distal-attribute

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

User, date Message
Written by Dave
4 years ago
Category: General
24 posts since Fri, 19 Sep 08
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!
Written by Dave
4 years ago
24 posts since Fri, 19 Sep 08
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!
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06

Dave wrote: 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.
Written by Dave
4 years ago
24 posts since Fri, 19 Sep 08
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.