Oracle SQL Query need to be fixed
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Oracle SQL Query need to be fixed

  1. #1
    Join Date
    Dec 2005
    Posts
    14

    Oracle SQL Query need to be fixed

    Hi,

    I have the following query for MS Access which is working fine

    SELECT GEO_POINTS.NAME AS ORIGIN, COUNTRIES.SHORT_NAME AS OCOUNTRY, GEO_POINTS_1.NAME AS [DEST LOCATION], COUNTRIES_1.SHORT_NAME AS DCOUNTRY, LTI_DETAILS.COMMODITY_CODE, LTI_MASTERS.FOOD_RELEASE, LTI_MASTERS.CODE AS LTI, LTI_MASTERS.LTI_DATE, LTI_MASTERS.TRANSPORT_CURRENCY, LTI_MASTERS.TRANSPORT_RATE, LTI_MASTERS.EXPIRY_DATE, LTI_MASTERS.REQUESTED_DISPATCH_DATE, LTI_MASTERS.STATUS_INDICATOR, LTI_MASTERS.ORGANIZATION_ID, LTI_DETAILS.NUMBER_OF_UNITS, LTI_DETAILS.QUANTITY_NET, LTI_DETAILS.QUANTITY_GROSS
    FROM ((GEO_POINTS AS GEO_POINTS_1 INNER JOIN (GEO_POINTS INNER JOIN (LTI_MASTERS INNER JOIN LTI_DETAILS ON LTI_MASTERS.LTI_ID = LTI_DETAILS.LTI_ID) ON GEO_POINTS.CODE = LTI_MASTERS.ORIGIN_LOCATION_CODE) ON GEO_POINTS_1.CODE = LTI_MASTERS.DESTINATION_LOCATION_CODE) INNER JOIN COUNTRIES AS COUNTRIES_1 ON GEO_POINTS_1.COUNTRY_CODE = COUNTRIES_1.CODE) INNER JOIN COUNTRIES ON GEO_POINTS.COUNTRY_CODE = COUNTRIES.CODE
    WHERE (((LTI_MASTERS.LTI_DATE) Between #1/1/2006# And #12/18/2006#));


    But When I run it in the Oracle SQL it shows the following error

    ORA-00923: FROM keyword not found where expected

    Any idea how to fix this code.

    Thanks,
    Last edited by faizulamin; 02-27-2007 at 01:18 AM.

  2. #2
    Join Date
    Sep 2001
    Location
    Makati, Philippines
    Posts
    857
    where... between... take a look.
    ---------------

  3. #3
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    GEO_POINTS_1.NAME AS [DEST LOCATION]
    the brackets are not allowed here I belive

  4. #4
    Join Date
    Dec 2005
    Posts
    14
    Quote Originally Posted by Bore
    GEO_POINTS_1.NAME AS [DEST LOCATION]
    the brackets are not allowed here I belive
    Yes you are right...

    Is it possibe to name a coulmn like 'Dest Location' etc I mean if I want spaces in the name e.g.

    Dest Location
    ..............
    USA
    AUS
    ENG

  5. #5
    Join Date
    Sep 2005
    Posts
    278
    Use Double Quotes
    Ex:
    loc As "Dest Location"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width