Subject | Eliminate Field Repetitions |
---|---|
Author | Rocky Castaneda |
Post date | 2005-07-20T16:39:05Z |
I have a simple select statement in my stored procedure and I want to
eliminate multiple occurence of field values in the resultset. What
would be the best approach to this type of problem?
ie.
My select statement actually returns the following:
DATE NAME AMOUNT
1/1/2000 ABC 1,000.00
1/2/2000 ABC 1,500.00
1/3/2000 ABC 1,800.00
1/1/2000 DEF 2,000.00
1/2/2000 DEF 3,500.00
1/3/2000 DEF 2,200.00
is it possible to accomplish the following result:
DATE NAME AMOUNT
1/1/2000 ABC 1,000.00
1/2/2000 - 1,500.00
1/3/2000 - 1,800.00
1/1/2000 DEF 2,000.00
1/2/2000 - 3,500.00
1/3/2000 - 2,200.00
Instead of having repetitive occurence of the name field?
TIA,
rocky
--
"When you are not practicing, remember, someone somewhere is
practicing, and when you meet him he will win. "
-Ed Macauley
eliminate multiple occurence of field values in the resultset. What
would be the best approach to this type of problem?
ie.
My select statement actually returns the following:
DATE NAME AMOUNT
1/1/2000 ABC 1,000.00
1/2/2000 ABC 1,500.00
1/3/2000 ABC 1,800.00
1/1/2000 DEF 2,000.00
1/2/2000 DEF 3,500.00
1/3/2000 DEF 2,200.00
is it possible to accomplish the following result:
DATE NAME AMOUNT
1/1/2000 ABC 1,000.00
1/2/2000 - 1,500.00
1/3/2000 - 1,800.00
1/1/2000 DEF 2,000.00
1/2/2000 - 3,500.00
1/3/2000 - 2,200.00
Instead of having repetitive occurence of the name field?
TIA,
rocky
--
"When you are not practicing, remember, someone somewhere is
practicing, and when you meet him he will win. "
-Ed Macauley