Solved

ORA-00900: invalid SQL statement

Posted on 2007-03-28
2
610 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Passing value to a stored procedure 8 70
another query question 7 26
complicated query 15 44
SQL query 4 31
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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

746 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

13 Experts available now in Live!

Get 1:1 Help Now