-
SQL help still
I am trying to write an sql statement which would return the most recent
row (determined by max(identity) based on the uniqueness of the composite of three columns. The example below explain this better. I am having the devil of a time combining the distinct logic and the max identity to return all
column values.
|.........uniqueness.....|
tb1.col1 tb2.col1 tb3.col1 tb4.col1 tb4.col2 tb4.identity
a a a 11 22 1
a a a 12 34 2 -- return this row
a b a 13 64 3 -- return this row
a c b 14 65 4
a c b 15 69 5 -- return this row
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|