Col header order

  • Hi

    If we write a query as

    Select firstname,lastname,age,dob,addr from Person

    the cols will be presented in the same order firstname,lastname,age,dob,addr.

    Is there a way I can rearrange the order of the cols presented without changing the order in select query.

    Something like (I remember reading it as possible some where)

    Select firstname 0,lastname 1,age 2,dob 4,addr 3 from Person

    Thanks

  • pzmrcd - what you're talking about is changing the "order by" from - say firstname to lastname....

    eg: if you had "Select firstname,lastname,age,dob,addr from Person order by firstname"

    - you could change it to "Select firstname,lastname,age,dob,addr from Person order by 2"

    and the "order by" would change to "lastname"...

    the other thing that you could possibly be referring to is when you access these values in (eg your application - regardless of the order in which you've selected them in your query you can reference by index instead of name - so you can say col(0) to refer to "firstname", col(4) to refer to "addr" and so on....

    afaik, there is no other way to rearrange the column selection except by explicitly selecting them in the order you want!







    **ASCII stupid question, get a stupid ANSI !!!**

  •  there is no other way to rearrange the column selection except by explicitly selecting them in the order you want!

    Sushilla sure there is  do it client side  This sounds like a presentation issue which is best handled on the client.

    Mike

  • 'swatisaid....in my second para....mayhaps you need some caffeine mike ?!?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Someone needs to read closer to the screen or get some new eye wear .

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply