Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Integrating an Oracle database with SQL statements
Thanks for this.
I have done something like what you are suggesting, basically I check if it is an Oracle DB and if it is I use TO_DATE and for all other data types I use #.
Hopefully this will work.
On Thu, 3 Jun 1999 11:46:04 -0400, "Jerry Gitomer" <jgitomer_at_hbsrx.com> wrote:
>Hi Kinna,
>
> Until Nirvana comes date standardization is unlikely between and among
>the various RDBMS. You have two choices -- assuming that you can't dump
>those other RDBMS and use only Oracle ;-)
>
> You can modify your SQL code for each occurrence of the date.
>
> You can develop a stored procedure for each RDBMS where the stored
>procedure will have a common name and the same arguments in each RDBMS.
>Then modify your SQL one time to call the stored procedure.
>
>regards
>
>Jerry Gitomer
>--------------------------------------------------------
>
>Kinna Patel wrote in message <375542ed.24728932_at_news.demon.co.uk>...
>>I have got the following SQL statement which will retrieve all the
>>records where date is > that 1/1/1998
>>
>>Select * from R_List where Date > '6/2/1999 23:59:59'
>>
>>This works fine when the database is Oracle but when the database is
>>anything else then I get an error message.
>>
>>What is the correct SQL for filtering on date fields which would work
>>on all database types?
>>
>>Thanks in advance for the help
>
>
Received on Thu Jun 03 1999 - 10:46:40 CDT
![]() |
![]() |