G
Guest
Hello,
Below is my table:
Raw_Data
@S1
A02F
A12F
A22F
@TPO
@TPC
@S2
A02F
A12F
A22F
@TPO
@TPC
etc……
The logice of the data is that "@" is the header record, and the "A" is the
detail of "@".
I want to wite a quert that results the following result in the "TAG" column:
Raw_Data Tag
@S1 1
A02F 1
A12F 1
A22F 1
@TPO 2
@TPC 3
@S2 4
A02F 4
A12F 4
A22F 4
@TPO 5
@TPC 6
Basically, the "TAG" column is grouping the header records with the detail.
Also, the data is "always" in sequentail order (which is a good thing).
Thanks,
Beagle
Below is my table:
Raw_Data
@S1
A02F
A12F
A22F
@TPO
@TPC
@S2
A02F
A12F
A22F
@TPO
@TPC
etc……
The logice of the data is that "@" is the header record, and the "A" is the
detail of "@".
I want to wite a quert that results the following result in the "TAG" column:
Raw_Data Tag
@S1 1
A02F 1
A12F 1
A22F 1
@TPO 2
@TPC 3
@S2 4
A02F 4
A12F 4
A22F 4
@TPO 5
@TPC 6
Basically, the "TAG" column is grouping the header records with the detail.
Also, the data is "always" in sequentail order (which is a good thing).
Thanks,
Beagle