greg85374
12-06-2005, 12:01 PM
I Keep getting the infamous error..the column name 'whatever' appears more than once..blah blah.
the problem is i need it more than once. Im using the following sql statement.
Any help would be highly appreciated...
the 'Whatever' part comes in on the last 2 lines before the word FROM
INSERT INTO [TblTransactions]
([TRAssocID],[TRAccCode],[TRAccSubCode],[cidTransType],
[TRDescription1],[TRDescription2],[TRTransDate],[TRTransAmount],
[TRCashType],[TRCheckNumber],[TRVID],[TRInvoiceNumber],
[cidDept],[TRFlag1099],[TRBankCode],[TrBankSubCode],
[TREntryPeriod],[TRBathcNumber],[TRSequenceNumber],[TREduCID],
[TREdMeetNumber],[TREducMeetYear],[TRBankCode],[TRBankSubCode],
[TrGlCode],[TrGlBank])
SELECT
[TRAssocID],[TRAccCode],[TRAccSubCode],[cidTransType],
[TRDescription1],[TRDescription2],[TRTransDate],[TRTransAmount],
[TRCashType],[TRCheckNumber],[TRVID],[TRInvoiceNumber],
[cidDept],[TRFlag1099],[TRBankCode],[TrBankSubCode],
[TREntryPeriod],[TRBathcNumber],[TRSequenceNumber],[TREduCID],
[TREdMeetNumber],[TREducMeetYear],[TRBankCode],[TRBankSubCode],
([TRAccCode] + [TRAccSubCode]) AS [TrAccCode],
([TRBankCode] + [TRBankSubCode]) AS [TrGlBank]
FROM [TblAdjInput] WHERE [TRAssocID] = '2'
the problem is i need it more than once. Im using the following sql statement.
Any help would be highly appreciated...
the 'Whatever' part comes in on the last 2 lines before the word FROM
INSERT INTO [TblTransactions]
([TRAssocID],[TRAccCode],[TRAccSubCode],[cidTransType],
[TRDescription1],[TRDescription2],[TRTransDate],[TRTransAmount],
[TRCashType],[TRCheckNumber],[TRVID],[TRInvoiceNumber],
[cidDept],[TRFlag1099],[TRBankCode],[TrBankSubCode],
[TREntryPeriod],[TRBathcNumber],[TRSequenceNumber],[TREduCID],
[TREdMeetNumber],[TREducMeetYear],[TRBankCode],[TRBankSubCode],
[TrGlCode],[TrGlBank])
SELECT
[TRAssocID],[TRAccCode],[TRAccSubCode],[cidTransType],
[TRDescription1],[TRDescription2],[TRTransDate],[TRTransAmount],
[TRCashType],[TRCheckNumber],[TRVID],[TRInvoiceNumber],
[cidDept],[TRFlag1099],[TRBankCode],[TrBankSubCode],
[TREntryPeriod],[TRBathcNumber],[TRSequenceNumber],[TREduCID],
[TREdMeetNumber],[TREducMeetYear],[TRBankCode],[TRBankSubCode],
([TRAccCode] + [TRAccSubCode]) AS [TrAccCode],
([TRBankCode] + [TRBankSubCode]) AS [TrGlBank]
FROM [TblAdjInput] WHERE [TRAssocID] = '2'