I am trying to add a column in a table but i'm stuck trying to figure out a way to assign sequence number to this column.
- Column
IDandC_Seq_Noare from one table (A) D_Seq_NoandTypeare from another table (B).
I'm trying to join the 2 tables together where anytime C_Seq_No shows up with the number "1" three times for one ID, then D_Seq_No would create a sequence number of 1, 2, and 3 for that ID.
Here is what I have when I run the query to join the 2 table since I haven't assigned anything to the D_Seq_No column yet:
TABLE A TABLE B
ID C_Seq_No | D_Seq_No Type
123 1 | NULL 02
123 1 | NULL 04
123 1 | NULL 06
123 2 | NULL 03
123 2 | NULL 05
123 2 | NULL 07
This is what I want in my query resultset to look like when joining those 2 tables:
ID C_Seq_No D_Seq_No Type
123 1 1 02
123 1 2 04
123 1 3 06
123 2 1 03
123 2 2 05
123 2 3 07