Subject | Re: [firebird-support] Distinct on one column only? How? |
---|---|
Author | Martijn Tonies |
Post date | 2005-05-18T08:47:09Z |
> I have the following statement.Don't select the "web_order" column.
>
> select distinct category, web_order from maststockitems
>
> When I run it I get the following:
>
> LETTERHEADS 1
> LETTERHEADS 2
> LETTERHEADS 3
> ENVELOPES 1
> ENVELOPES 2
>
> What I actually want is one row for each category regardless of
> whether the web order field has changed.
>
> The documentation says that the distinct clause is applied to every
> column in the select statement.
>
> How can I acheive one row per category?
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com