G
Guest
I have Table1 which has 50 records that I want to insert into Table2 which is
straight forward with an INSERT INTO Table1 (...) SELECT (...) FROM Table2.
However in on of the fields I need to pass in a VB variable for each of the
50 records thus making them specific to that variable. In the code below I
would also like to add a value to the field called CONTRACT which would be
added to dbo_BusinessRules but I can't figure out how to do it?
My code from within VB looks like this and this works:
INSERT INTO dbo_BusinessRules ( [SR], [PR], [PA], [RULE_CODE], [RULE_DESC],
[RULE_TYPE] )
SELECT TLC_RULES.SR, TLC_RULES.PR, TLC_RULES.PA, TLC_RULES.RULE_CODE,
TLC_RULES.RULE_DESC, TLC_RULES.RULE_TYPE
FROM TLC_RULES
straight forward with an INSERT INTO Table1 (...) SELECT (...) FROM Table2.
However in on of the fields I need to pass in a VB variable for each of the
50 records thus making them specific to that variable. In the code below I
would also like to add a value to the field called CONTRACT which would be
added to dbo_BusinessRules but I can't figure out how to do it?
My code from within VB looks like this and this works:
INSERT INTO dbo_BusinessRules ( [SR], [PR], [PA], [RULE_CODE], [RULE_DESC],
[RULE_TYPE] )
SELECT TLC_RULES.SR, TLC_RULES.PR, TLC_RULES.PA, TLC_RULES.RULE_CODE,
TLC_RULES.RULE_DESC, TLC_RULES.RULE_TYPE
FROM TLC_RULES