Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column headings

Status
Not open for further replies.

alexhu

MIS
Sep 25, 2001
1,288
GB
I have a query;

select a.depotcd ||'|'||
b.carrcd ||'|'||
b.name ||'|'||
b.address1 ||'|'||
b.address2 ||'|'||
b.city ||'|'||
b.state ||'|'||
b.zipcd ||'|'||
b.contact ||'|'||
b.telnr ||'|'||
b.faxnr ||'|'||
b.currencycd ||'|'||
b.scac ||'|' from zzzzzz a, carriers b;

How can I change the column headings to something sensible ?

The normal method of 'column new_column' does not appear to work because of the concatenation characters.

Any ideas ?

Alex

 
You're selecting only 1 column, so you may change only 1 header:

column a heading depotcd|carrcd|...

select a.depotcd ||'|'||
b.carrcd ||'|'||
b.name ||'|'||
b.address1 ||'|'||
b.address2 ||'|'||
b.city ||'|'||
b.state ||'|'||
b.zipcd ||'|'||
b.contact ||'|'||
b.telnr ||'|'||
b.faxnr ||'|'||
b.currencycd ||'|'||
b.scac ||'|' a from zzzzzz a, carriers b;

It's up to you to adjust parts of heading with parts of column, if you need it, because column components lengths may not be fixed.

Tip: if using vertical bar in heading change HEADSEP, that is | by default.

Another tip: if you need to print column delimeters, you don't need concatenation. Just issue SET COLSEP |


Regards, Dima
 
Thanks sem, that seems to work fine - only needed the SET COLSEP |

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top