Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: formatting column in sql

Re: formatting column in sql

From: Michael Kirkorian <"mike.kirkorian>
Date: Thu, 14 Oct 2004 19:58:44 +0200
Message-ID: <416ebbc0$0$564$626a14ce@news.free.fr>


root wrote:
> Im tring to set a column format for a rather large column.
>
> COLUMN '<AHREF="REPORT'||SYSDATE||'.HTML#'||A.US_ID||'">' HEADING link
>
>
> select '<a href="report'||sysdate||'.html#'||a.us_id||'">', a.first_name||'
> '||a.last_name||'</a>',
> a.phone_area||'-'||a.phone_exchange||'-'||a.phone_line, b.vaccination_date,
> c.name, d.occupation_desc||'<br>'
> from patients a, vaccines b, organizations c, occupations d,
> pat_adult_info e
> where e.us_id = a.us_id and e.occupation_code = d.occupation_code(+) and
> c.org_id(+) = b.refer_org_id and a.patient_id = b.patient_id and
> b.vaccine_code = 75;
>
> is the query but the first returns
>
> SQL> COLUMN '<A HREF="REPORT'||SYSDATE||'.HTML#'||A.US_ID||!'">' HEADING
> link
> SP2-0735: unknown COLUMN option beginning "SYSDATE..."
>
> I tried setting the escape to '/' and then putting that in front of all the
> ' in the column command but that doesn't seem to work, any ideas?
>
>
> TIA
>
>

sysdate is a date and you use it as if it was a string. So if you use to_char(sysdate) it should work better (if no special character are present in the string). Received on Thu Oct 14 2004 - 12:58:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US