S
steve
Hi,
this is very simple.
I have a table with:
Name
Num1
number2
Date
Value1
etc.
I want to extract all distinct Date values ONLY and keep the rest of the
information.
SELECT DISTINCT Name, Date, .......
will consider the whole row, but that's not what I want.
e.g.: from a a table:
item_A 100 0001 9/2/02 blah....
item_B 250 0001 9/3/02 n/a
item_D 80 0002 9/3/02 n/a
item_B 90 0002 8/8/02 n/a
will give:
item_A 100 0001 9/2/02 blah
item_B 250 0001 9/3/02 n/a
(missing....)
item_B 90 0002 8/8/02 n/a
where as SELECT DISTINCT will not have filtered anything because all lines
are distinct (in all fields together).
As long as we are about to have a duplicate Date we discard the row.
SIMPLE!
why the heck i cannot find an answer.
ANY help will be greately appreciated.
-steve
this is very simple.
I have a table with:
Name
Num1
number2
Date
Value1
etc.
I want to extract all distinct Date values ONLY and keep the rest of the
information.
SELECT DISTINCT Name, Date, .......
will consider the whole row, but that's not what I want.
e.g.: from a a table:
item_A 100 0001 9/2/02 blah....
item_B 250 0001 9/3/02 n/a
item_D 80 0002 9/3/02 n/a
item_B 90 0002 8/8/02 n/a
will give:
item_A 100 0001 9/2/02 blah
item_B 250 0001 9/3/02 n/a
(missing....)
item_B 90 0002 8/8/02 n/a
where as SELECT DISTINCT will not have filtered anything because all lines
are distinct (in all fields together).
As long as we are about to have a duplicate Date we discard the row.
SIMPLE!
why the heck i cannot find an answer.
ANY help will be greately appreciated.
-steve