Problem solve Get help with specific problems with your technologies, process and projects.

Showing fields with SQL

Locate the field you want quickly with 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.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close