December 12, 2006 at 2:24 pm
NP. Good luck with the rest of that project.
December 13, 2006 at 11:37 am
Why can't you just do this:
Declare
@strSQL nvarchar(max)
SELECT
@strSQL = ' INSERT INTO EPF_PROD..tblBatch(vchBatchNo, vchRecID, vchFiller, vchStateCode, intTotalForm, intTotalEmployerCont, intTotalEmployeeCont, intHashTotal) ' +
+ ' SELECT P.vchBatchNo, P.vchRecID, P.vchFiller, P.vchStateCode, P.intTotalForm, P.intTotalEmployerCont, P.intTotalEmployeeCont, P.intHashTotal ' +
+ ' FROM ' + @tabPName + ' P with(nolock)'
+ ' Inner Join ' + @tabSName + ' S with(nolock) On P.vchBatchNo = S.vchBatchNo' +
+ ' AND P.vchRecID = S.vchRecID'
EXECUTE
(@strSQL)
Viewing 2 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply