Sunday, June 15, 2008

Showing fields in SQL:

When using SQL to view data interactively, it can be maddening to window to the right (F20) to find the field you want to see.
Wouldn't it be nice to be able to show all fields, but have certain fields show up in the left-most columns so you don't have to window to the right to find them?
Here's how it can be done:
1. Normal way of showing all fields with SQL:
SELECT * FROM Filename
This will show all fields in the order they occur in the file.
2. Select field1, field2, filename.*
This shows field1 in the first column, field2 in the second column, and all fields will be shown (including field1 and field2 again, wherever they occur) beginning in the third column.

No comments: