Hello all,
I have a table that has the following columns:
CoCode
PolNum
SecComCode
FormType
MainID
OrigName
The data in the tables is as follows:
CoCode PolNum SecComCode FormType MainID OrigName
L 1234 0 1 X
L 1234 0 VER 2
How do I perform a self-join on the table so that I get one row as follows:
CoCode PolNum SecComCode FormType OrigName
L 1234 0 VER X
The primary key on the table is MainID and data has been inserted in a way that we have 2 diff rows for the same set of CoCode, PolNum and SecComCode.
Any help is appreciated.
Thanks !
I have a table that has the following columns:
CoCode
PolNum
SecComCode
FormType
MainID
OrigName
The data in the tables is as follows:
CoCode PolNum SecComCode FormType MainID OrigName
L 1234 0 1 X
L 1234 0 VER 2
How do I perform a self-join on the table so that I get one row as follows:
CoCode PolNum SecComCode FormType OrigName
L 1234 0 VER X
The primary key on the table is MainID and data has been inserted in a way that we have 2 diff rows for the same set of CoCode, PolNum and SecComCode.
Any help is appreciated.
Thanks !