Solved

ORA-00900: invalid SQL statement

Posted on 2007-03-28
2
632 Views
Last Modified: 2013-12-07
Why is this not being excepted?

Select

        *

From

        tmoadm.dat01 d1,

        tmoadm.dat02 d2

Where

       rownum < 15 AND

       d1.LOAN_NUM = d2.LOAN_NUM AND

       (

                          (d2.application_date >= '01/Jan/2007'  And

                          d2.application_date < '02-Jan-2007')

                          OR

                          (d2.FUNDING_AMOUNT >= '01/Jan/2007' And

                          d2.FUNDING_AMOUNT < '02-Jan-2007')

      )
0
Comment
Question by:rufassa
  • 2
2 Comments
 
LVL 20

Accepted Solution

by:
gatorvip earned 125 total points
ID: 18810301
Well, for one, you need to convert your date strings to a valid date format. Use the to_date() function.
0
 
LVL 20

Expert Comment

by:gatorvip
ID: 18810313
Also, are you sure that FUNDING_AMOUNT is really a date as it appears to be in your code? It's misnamed, in that case (imo).
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now