DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: This query should fail with 5 "from clause not found where expected" errors, but..

  1. #1
    Join Date
    Mar 2006
    Posts
    74

    This query should fail with 5 "from clause not found where expected" errors, but..

    it doesnt..

    can someone else with oracle 9.2 offer any clues?

    Code:
    select
      postcode
      bank_acc_no,
      bank_acc_no
      postcode,
      address_ref,
      address_ref
      postcode,
      bank_sort_code
      postcode
    from
      (select 'bsc' as bank_sort_code, 'bank acc no' as bank_acc_no from dual)
      left outer join
      (select 'bsc' as bank_sort_code, 'ar' as address_ref from dual)
        using(bank_sort_code)
    
      left outer join
      (select 'ar' as address_ref, 'postcode' as postcode from dual)
        using(address_ref)
    results:
    Code:
    BANK_ACC_NO	POSTCODE	ADDRESS_REF	POSTCODE	POSTCODE
    postcode	bank acc no	ar		ar		bsc

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    No, I think it's doing the right thing. Line 3 "bank_acc_no," is being treated as a column alias of line 2 "postcode" etc.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Mar 2006
    Posts
    74
    Of course! thanks for that!

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