| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SET with sysdate as a character string
"corp.supernews.com" <cdanforth_at_airadigmNOSPAM.com> wrote in message
news:tpcge77oh3gj83_at_corp.supernews.com...
> Hello
>
> I am reletively new to sql and what I need is to update a field with
> tomorrow's date as yyyymmdd as a character string. Here is an example
part
> of my script:
>
> UPDATE tablename
> SET fieldname= '-r -y -d 20010905'
>
> What I am trying to do is write a script in perl to automate this sql
script
> to update this field so it puts in tomorrows date. I've tried using
> to_char(sysdate +1, 'yyyymmdd'), but failed. Any ideas?
>
>
>
>
provided the column is a date variable
update
set fieldname = trunc(sysdate + 1)
should work just fine, no to_char needed.
Hth,
Sybrand Bakker, Senior Oracle DBA Received on Wed Sep 05 2001 - 11:19:14 CDT
![]() |
![]() |