R
Rudy
Please Help -
I have a database that contains a "To" and a "From" column for each
record. However, I am trying to expand the file into unique records
for each "To" From" combination. The following is an example of data:
This is what I have:
UserID FromCostCenter ToCostCenter
A 0001 0005
B 1006 1009
This is what I'd like to have:
UserID CostCenter
A 0001
A 0002
A 0003
A 0004
A 0005
B 1006
B 1007
B 1008
B 1009
I started by converting the fields to numeric values and subtracting
the From value from the To value to understand the number of cost
centers that either need to be incremented from the minimum value
(minus 1 for the existing maximum). I imagine I need to write a
statement that takes the user ID and somehow uses the increment field
but I do not know how to programatically do this.
If you can help that would be great.
Thanks - Rudy
I have a database that contains a "To" and a "From" column for each
record. However, I am trying to expand the file into unique records
for each "To" From" combination. The following is an example of data:
This is what I have:
UserID FromCostCenter ToCostCenter
A 0001 0005
B 1006 1009
This is what I'd like to have:
UserID CostCenter
A 0001
A 0002
A 0003
A 0004
A 0005
B 1006
B 1007
B 1008
B 1009
I started by converting the fields to numeric values and subtracting
the From value from the To value to understand the number of cost
centers that either need to be incremented from the minimum value
(minus 1 for the existing maximum). I imagine I need to write a
statement that takes the user ID and somehow uses the increment field
but I do not know how to programatically do this.
If you can help that would be great.
Thanks - Rudy