Re: HELP! TO_CHAR FUNCTION IN SELECT - Oracle7 on Windows 95
Date: 1996/04/26
Message-ID: <4lqtqd$snt_at_inet-nntp-gw-1.us.oracle.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
You need to:
SQL> column "Date and Time" format a20
Double Quote the column name in the column command since it is in mixed case with embedded blanks. Normally you would just say column x format a20 but only if the column was really X (in uppercase, no special characters).
>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
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
opinions and statements are mine and do not necessarily reflect the opinions of Oracle Corporation. Received on Fri Apr 26 1996 - 00:00:00 CEST