Hello
I have a huge SQL view I am writing at work and I have come across a problem as far as filtering records. I have a record set that gets returned but there are duplicate records.
for instance
Rec URN Name sequence #
123123 bob 1
123123 bob 2
Now everything in the records is identical except for one field, so it is getting counted twice when it should only get counted once.
In the SELECT part I have some aggerate functions so I have to use the GROUP BY command for the rest of fields that are not aggerate.
There has to be a way to only select one record based on the URN vs both of them
I have tried the disctinct command and that didn't work within the SELECT statement.
Any ideas would be helpful
Thanks
Leeland
I have a huge SQL view I am writing at work and I have come across a problem as far as filtering records. I have a record set that gets returned but there are duplicate records.
for instance
Rec URN Name sequence #
123123 bob 1
123123 bob 2
Now everything in the records is identical except for one field, so it is getting counted twice when it should only get counted once.
In the SELECT part I have some aggerate functions so I have to use the GROUP BY command for the rest of fields that are not aggerate.
There has to be a way to only select one record based on the URN vs both of them
I have tried the disctinct command and that didn't work within the SELECT statement.
Any ideas would be helpful
Thanks
Leeland