Re: need help with a number conversion
From: Chris <christianboivin1_at_hotmail.com>
Date: 11 Dec 2001 10:13:18 -0800
Message-ID: <da20daf0.0112111013.2048cc56_at_posting.google.com>
FROM DUAL hth
Chris
Date: 11 Dec 2001 10:13:18 -0800
Message-ID: <da20daf0.0112111013.2048cc56_at_posting.google.com>
Hi
you can do this
SELECT DECODE (
:myday, 1, 'sunday', 2, 'monday', 3, 'thusday', 4, 'wed', 5, '..', 6, '..', 7, '..' )
FROM DUAL hth
Chris
hap_at_mikomi.org (Adam Hapworth) wrote in message news:<a6cb04db.0112110709.47542b8c_at_posting.google.com>...
> I am having a hard time trying to make this work.
>
> I have a number 1-7 for each day of the week in a database. I want to
> turn that into the 'day' format so 1 = 'sunday' and so on. I have
> tried a number of different ways but none of them work. I need this
> to do the next_day() function in oracle 8
>
> to_date(2,'day')
> ORA-01846: not a valid day of week
>
> to_char(2,'day')
> ORA-01481: invalid number format model
>
>
> any ideas will help
Received on Tue Dec 11 2001 - 19:13:18 CET