Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    India
    Posts
    55

    Unhappy Unanswered: Column Reference Problem

    Hi Folks,

    Back again with a new problem....
    My Problem is

    I have a simple select query
    The query contains the same field being selected twice and without any aliases.Now when i try to order the query by this field oracel gifts me an ambiguity error.

    Ex
    select filed1,field2,field3,.......,field1 from tablemine
    order by field 1.

    any way to refernce the field without using and alias.

    Thanx in advance
    Regs
    Sree

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Well, why not use an alias? But anyway, you can refer to columns by position in the ORDER BY clause:

    select filed1,field2,field3,.......,field1 from tablemine
    order by 1;

  3. #3
    Join Date
    Oct 2003
    Location
    India
    Posts
    55

    Hi

    Hi,

    Thanx Buddy...
    thats exactly what i wanted

    Regs
    Sree

Posting Permissions

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