Re: HELP! TO_CHAR FUNCTION IN SELECT - Oracle7 on Windows 95

From: David J Roth <droth_at_adaptron.com>
Date: 1996/05/01
Message-ID: <4m7g2s$7bu_at_maddawg.sii.com>#1/1


Harpreet Chawla <chawla_at_niehs.nih.gov> wrote:
>
> I am doing my first project in Oracle. The statement -
>
> SELECT TO_CHAR(col_with_date_datatype, 'mm/dd/yy hh24:mi:ss') "Date and
> Time",col_a,col_b FROM table_name WHERE ...;
>
> is producing too-wide (almost 80 column) "Date and Time" column display.
> SQL*Plus 32 is executing the SQL commands. I have tried
>
> COLUMN name FORMAT A20
>
> but has no affect on the display format. Similar examples in Oracle
> manuals show proper output. Any help thru posting/e-mail would be
> appreciated?
> Thanks in advance,
> Harpreet
>
>

Try the following;

col xxxx format a20 heading "Date and Time"

SELECT	TO_CHAR(col_with_date_datatype, 'mm/dd/yy hh24:mi:ss') xxxx,
	col_a,
	col_b
FROM	table_name

WHERE ...; Dave Roth Received on Wed May 01 1996 - 00:00:00 CEST

Original text of this message