Generating multiple rows based on the data of 2 input column
Posted: Mon Jan 14, 2008 7:04 pm
Hi all,
I have a input file with two columns (MIN_ZIP_CODE and MAX_ZIP_CODE).
For example:
I need to generate the output as follows:
In other words,
Any idea of how this can be achieved? My brain's half dead. Any ideas/suggestions/pointers are greatly appreciated.
Thanks,
Whale.
I have a input file with two columns (MIN_ZIP_CODE and MAX_ZIP_CODE).
For example:
Code: Select all
MIN_ZIP_CODE MAX_ZIP_CODE
75101 75104
89430 89435
00010 00015
Code: Select all
MIN_ZIP_CODE MAX_ZIP_CODE ZIP_CODE
75101 75104 75101
75101 75104 75102
75101 75104 75103
75101 75104 75104
89430 89435 89430
89430 89435 89431
89430 89435 89432
89430 89435 89433
89430 89435 89434
89430 89435 89435
00010 00015 00010
00010 00015 00011
00010 00015 00012
00010 00015 00013
00010 00015 00014
00010 00015 00015
Code: Select all
Zip_Code, is obtained by expanding the zip-code range starting from the MIN_ZIP_CODE, incrementing it by 1 until the MAX_ZIP_CODE value is reached.
Thanks,
Whale.