Pass Through Query to Oracle Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having problems writing a SQL pass-through query to an Oracle table. The
query that I am doing is straight forward, however, I know that the SQL code
is different from Access SQL.

Here is the code

(Select (Sum(Net_Booking_Count)) Bookings,
From Master_Table
Where Date = 1/1/2005)

If I remove the Sum it works. Whenever I put in the Sum and have it change
the name to Bookings it errors out.

Does anyone know what I might be doing wrong? Also does anyone know a good
site that breaks down Oracle SQL code to use for MS Access queries.

Thx
 
I'm assuming that you're trying to name the summation column "Bookings".

While I don't know Oracle SQL, in other dialects, you'd use As Bookings, not
simply Bookings.

Also, in other dialects, you'd need to put some sort of a delimiter around
the date. In Jet SQL, the delimiter is #:

Where Date = #1/1/2005#

while in SQL Server SQL, you'd use a single quote:

Where Date = '1/1/2005'
 
I know in all my Oracle SQL I would have to format the date you want as:
WHERE
DATE = to_date('DD-MON-YYYY','01-JAN-2005')
 
Back
Top