Well, had a consultant run away and drop the huge project he couldn't handle in my lap. I'm thus forced to figure out and implement a single query before a go-live tomorrow morning. Any SQL references I've been able to peruse haven't put me on the right track... So here's my problem:
I've got a table like the following:
Event_Location Event_ID Claim_ID
1073 90100 10114
1073 90101 10114
1075 90102 10114
1073 90103 10114
1023 10201 10226
1032 10202 10226
1034 10203 10226
1055 10204 10226
I need a query which will add a code ("A01", "A02", or "A03"
to an empty field based on an event's position within each claim. "A01" will specify the first event in the claim (Event_IDs 90100 and 10201 here), "A02" will show any changes of location within the claim (Event_IDs 90102, 10202, and 10203), and "A03" the final event (90103 and 10204).
Now, getting the "A01" and "A03" in was easy enough. I just cannot, however, figure out a way to add the "A02"s. While I could easily pull it off in Excel, the sheer volume (38,000 claims comes out to a staggering number of records) is prohibitive.
Can anyone help me out here? I could really use it!
Thanks,
Ben Scott
I've got a table like the following:
Event_Location Event_ID Claim_ID
1073 90100 10114
1073 90101 10114
1075 90102 10114
1073 90103 10114
1023 10201 10226
1032 10202 10226
1034 10203 10226
1055 10204 10226
I need a query which will add a code ("A01", "A02", or "A03"
Now, getting the "A01" and "A03" in was easy enough. I just cannot, however, figure out a way to add the "A02"s. While I could easily pull it off in Excel, the sheer volume (38,000 claims comes out to a staggering number of records) is prohibitive.
Can anyone help me out here? I could really use it!
Thanks,
Ben Scott