IT_is_spatial
New member
- Joined
- Jun 10, 2005
- Messages
- 3
- Programming Experience
- Beginner
I'm brand new to SQL so I was hoping for a little help. I'm sure this is pretty easy.
I've got a table with 3 columns.
ZIP | LOWSEG | HIGHSEG
----------------------------
72015| 01 | 99 |
What I need is to loop through each record and insert a new record for each value between the LOWSEG and HIGHSEG. So my end table will look something like
ZIP | LOWSEG | HIGHSEG
--------------------------------
72015 | 01 | 99
--------------------------------
72015 | 02 | 99
---------------------------------
72015 | 03 | 99
---------------------------------
ETC..........................
I've got a vbs script that does what I want. But I'm wanting to move it to a stored procedure.
Any help would be great Thanks
I've got a table with 3 columns.
ZIP | LOWSEG | HIGHSEG
----------------------------
72015| 01 | 99 |
What I need is to loop through each record and insert a new record for each value between the LOWSEG and HIGHSEG. So my end table will look something like
ZIP | LOWSEG | HIGHSEG
--------------------------------
72015 | 01 | 99
--------------------------------
72015 | 02 | 99
---------------------------------
72015 | 03 | 99
---------------------------------
ETC..........................
I've got a vbs script that does what I want. But I'm wanting to move it to a stored procedure.
Any help would be great Thanks