@rajeshalwayswel wrote:
In new variables Visit_, Visitnum_.
That's not a rule. It's an example. You post
VISIT VISITNUM VISIT_ VISITNUM_
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
VISIT 1 1 VISIT 1 1
UNSCH 999 UNSCH VISIT 1 999.001 999.001
UNSCH 999 UNSCH VISIT 1 999.002 999.002
It doesn't answer these questions:
- Do you only have two types of records?
- type 1: VISIT="VISIT 1", and VISITNUM=1
and
- type 2: VISIT=UNSCH and VISITNUM=999
- If you really only have these two types, it appears that for type 1, VISIT_=VISIT and VISITNUM_=VISITNUM, right?
- But for VISITNUM=999, you have VISITNUM_ as a sequence (999.001,999.002). If you have subsequent "VISIT 1" records, followed by another 999 record, does that record become 999.003, or do you restart at 999.001?
- How does UNSCH become UNSCH VISIT 1? Does the "VISIT 1" part come from retaining the preceding "VISIT 1" value (i.e. the most recent non-UNSCH value for VISIT?), or is it a constant value that you always insert in such a case?