G
Guest
I need to append records to [MERGE] from the records in [IMPORT] ONLY where
[IMPORT].[PERIOD_VALUE] = '2' AND [IMPORT].[ACCTNO] does not exist in
[MERGE].[ACCTNO].
The data types are identical and the columns are in the same order, but the
column names are not the same:
[MERGE]: ACCTNO; ACCOUNT_DESC; PY_ACTUAL;
[IMPORT]: ACCTNO; ACCOUNT_DESC; YTD_ACTUAL;
My code so far (as you can see I need a lot of help):
INSERT INTO [MERGE] (ACCTNO, ACCOUNT_DESC, PY_ACTUAL) "
SELECT ACCTNO, ACCOUNT_DESC, YTD_ACTUAL FROM [IMPORT]
Could someone please correct my SQL? Thanks much in advance from a depressed
beginner...
[IMPORT].[PERIOD_VALUE] = '2' AND [IMPORT].[ACCTNO] does not exist in
[MERGE].[ACCTNO].
The data types are identical and the columns are in the same order, but the
column names are not the same:
[MERGE]: ACCTNO; ACCOUNT_DESC; PY_ACTUAL;
[IMPORT]: ACCTNO; ACCOUNT_DESC; YTD_ACTUAL;
My code so far (as you can see I need a lot of help):
INSERT INTO [MERGE] (ACCTNO, ACCOUNT_DESC, PY_ACTUAL) "
SELECT ACCTNO, ACCOUNT_DESC, YTD_ACTUAL FROM [IMPORT]
Could someone please correct my SQL? Thanks much in advance from a depressed
beginner...