Garreth21
Programmer
- May 19, 2005
- 29
Hi everyone
I need to go through a table of data and look at 3 specific columns. If the value is greater then 0 for a given column, I need to make a new record in another table.
Here's an example
Table 1
ID Total Bonus A Bonus B Bonus
TEST1 125.25 500 250
TEST2 340 0 100
Table 2
ID TYPE AMOUNT
TEST1 Total Bonus 125.25
TEST2 Total Bonus 340
TEST1 A Bonus 500
TEST1 B Bonus 250
TEST2 B Bonus 100
I can't seem to figure it out. I would like to do it with out cursors if possible. Anyone have any advice on how to go about this?
Thanks in advance.
I need to go through a table of data and look at 3 specific columns. If the value is greater then 0 for a given column, I need to make a new record in another table.
Here's an example
Table 1
ID Total Bonus A Bonus B Bonus
TEST1 125.25 500 250
TEST2 340 0 100
Table 2
ID TYPE AMOUNT
TEST1 Total Bonus 125.25
TEST2 Total Bonus 340
TEST1 A Bonus 500
TEST1 B Bonus 250
TEST2 B Bonus 100
I can't seem to figure it out. I would like to do it with out cursors if possible. Anyone have any advice on how to go about this?
Thanks in advance.