On 15 Jan 2003, at 20:13, Ken Easson wrote:
> SELECT DISTINCT price FROM sys_bld_foo WHERE catNum IN
> ('item1', 'partA', 'partB', 'partB');
It's possible that the query you want is
SELECT DISTINCT catNum, price FROM sys_bld_foo
WHERE catNum IN ('item1', 'partA', 'partB', 'partB');
or
>
>What is the problem, the business problem you are trying to solve? or what do
>you need from your data? i think you are just querieng for the wrong
>information .. but since i dont know what you are trying to do, i cant say
>more right now.
>Id need more information..
&
just querieng for the wrong
information .. but since i dont know what you are trying to do, i cant say
more right now.
Id need more information..
Brian Lindner
------ Original Message -
Subject: how do i retrieve distinct rows using IN
Date: Wed, 15 Jan 2003 15:12:37 -0400
SELECT SUM( price ) from sys_bld_foo where catNum IN ('item1', 'partA',
'partB') group by catNum;
Ken Easson wrote:
hello,
I have a list of things ('item1', 'partA', 'partB', 'partB')
which relate to catNum items in a table sys_bld_foo.
table sys_bld_foo:
component: varchar 16
catNum: varchar
hello,
I have a list of things ('item1', 'partA', 'partB', 'partB')
which relate to catNum items in a table sys_bld_foo.
table sys_bld_foo:
component: varchar 16
catNum: varchar 16
price: decimal (10,2)
i want to return 1 row for each item:
when i use:
SELECT DISTINCT price FROM sys_bld_foo WHE