RE: Select statement question
Posted in 2000
So, you think maybe I took "...a select statement" too literally?
--- "Balmer,Glyn" <Glyn.Balmer@supertension.com>
> wrote:
>Could you not select into a temporary table, using the selected column to
>order the data then re-select from the temporary table omitting the
>offending column. Maybe even a cluster index on the temporary table ?
>
>Select col1, col2 from my_table order by 1 into temp my_temp with no log;>
>Create cluster index temp_index on my_temp(col1); -- optional>
>Select col2 from my_temp>
>Regards
>Glyn Balmer
>
>
> -----Original Message-----
> From: Carlos Benjamin [mailto:benj@firstlinux.net]
> Sent: 30 October 2000 14:13
> To: Ira Rosen; informix-list@iiug.org
> Subject: Re: Select statement question
>
>
>
> --- "Ira Rosen" <irosen1@email.mot.com>
> > wrote:
> >Is there some way with Informix to execute a select
>statement containing an
> >order by clause with 1 column such that the column in the
>order by clause
> >does not need to be output by the select statement? In
>other words, I want
> >to order output based on a column, but I don't want to see
>the content in my
> >output. I didn't see any obvious ways looking at the select
>syntax in the
> >Informix Guide to SQL Syntax document. I've worked with
>other databases that
> >have this functionality, so I'd expect Informix to offer
>this functionality
> >as well.
> >
> >-Ira Rosen
> >Motorola Inc.
>
> Not in an SQL statement only, but you can accomplish your
>task within a report. You can't order by something you are not selecting. In
>a report you can choose to print only the data you wish to see even if you
>choose not to print the column your data was sorted by.
>
> ==
> Maintainer of the procrastinator's FAQ.
>Well, maybe tomorrow I will be.
>
>
>_____________________________________________________________
> Want a new web-based email account ? --->
>http://www.firstlinux.net
>
>
> Half.com the hottest site for DVDs, CDs & more! Get $5 off
>your 1st
> purchase of $10 or more.
>http://ads.adflight.com/mach1.asp?a=19061&b=46867&c=3094
==
Maintainer of the procrastinator's FAQ. Well, maybe tomorrow I will be.
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
Half.com the hottest site for DVDs, CDs & more! Get $5 off your 1st
purchase of $10 or more. http://ads.adflight.com/mach1.asp?a=19061&b=46867&c=3094