dianemarie
Instructor
Hello, in my report I have a parameter which pulls by client ID and displays both client ID and name. A second parameter brings up a list of products associated with that client, by product ID, and displays product name.
I'm using one table with a mixed dataset of old and new product names, but the same product ID number. In the parameter drop-down, I don't care which product name is displayed with the product ID.
The problem is I'm getting the same ID number twice, with the new name and the old name. I've played with distinct and group by, but can't get it to display just one number with one product name, I don't care which product name gets pulled - new or old.
Is there a way to do this using the existing table of detail records? We were initially using views, but there were issues with ID conflicts. This is the current query I am using. Any help is appreciated. Thank you.
select distinct(lo.prodid),lo.prodname
from nm_ordhistall LO
where lo.prodid in (@Owner)
order by 2,1
I'm using one table with a mixed dataset of old and new product names, but the same product ID number. In the parameter drop-down, I don't care which product name is displayed with the product ID.
The problem is I'm getting the same ID number twice, with the new name and the old name. I've played with distinct and group by, but can't get it to display just one number with one product name, I don't care which product name gets pulled - new or old.
Is there a way to do this using the existing table of detail records? We were initially using views, but there were issues with ID conflicts. This is the current query I am using. Any help is appreciated. Thank you.
select distinct(lo.prodid),lo.prodname
from nm_ordhistall LO
where lo.prodid in (@Owner)
order by 2,1