Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql database problem
i presume you are using sql*plus. you need to use the column command. the
command would be:
column short_town format A10
do this before you run the query. other info on the column command can be found in the sql*plus manual at technet.oracle.com
Dave P.
Mark Thomas <mark.thomas5_at_dtn.ntl> wrote in message
news:5PbB4.2397$5b5.85410_at_news2-win.server.ntlworld.com...
> can anyone help with this problem:
>
> i need to head a column short_town showing in upper case the 3 left most
> characters of towns.
> what have i done wrong below?
> only SHO is shown not short_town
>
> select acc_no, upper(substr(town,1,3)) short_town
> from customer
> where county like 'S Glam%';
>
> ACC_NO SHO
> ---------- ---
> 107543 CAR
> 106291 PEN
> 197333 CAR
> 246082 BAR
> 159200 LLA
> 166937 CAR
> 114905 BAR
> 123720 CAR
>
> thanx in advance
>
> mark
>
>
Received on Sun Mar 19 2000 - 17:48:35 CST