For example, my column names are [1], [3], [5], [2] in the table.  I want
to know if there are statements that would sort these column names and
display them in [1], [2], [3], [5] instead of the original order.

besides DBI, is there ways of achieving this with SELECT statement?

Thank you so much!

Eric

On Tue, 20 Aug 2002, Bob Showalter wrote:

> > -----Original Message-----
> > From: learn perl [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 20, 2002 3:16 PM
> > To: Bob Showalter
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: SQL question
> >
> >
> > Yes I want to have the columns come out in a sorted order without
> > specifying them like "select col1, col2, col3 from database" because I
> > have too many columns (close to 80).  Is there ways to select
> > a table w/o
> > specifically telling the SQL server which ones I want?
>
> Define "sorted order". Sorted by column name? Sorted by value? I'm getting
> confused.
>
> If you're using DBI, you can use "SELECT * FROM table" and then call
> fetchrow_hashref() (or use $sth->{NAME}) and use the column names returned
> to order your columns in whatever way you want.
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to