Hi All,
until I worked on add field to exist report on the system to add a field with the name (CurrencyCode) I got the below exception, could anyone support me to solve this case ......
Code..
insert_recordset vendProvisionalBalanceTmpProcessing
(AccountNum, PostingProfile,CurrencyCode, VendAccountName, MainAccountId, MainAccountName)
select AccountNum from vendTable
group by vendTable.AccountNum, vendTrans.PostingProfile,vendTrans.CurrencyCode
join PostingProfile,CurrencyCode from vendTrans
where vendTrans.AccountNum == vendTable.AccountNum
join maxOf(Name) from dirPartyTable
where dirPartyTable.RecId == vendTable.Party
join vendLedgerAccounts
where ((vendLedgerAccounts.AccountCode == TableGroupAll::Table && vendLedgerAccounts.Num == vendTrans.AccountNum)
|| (vendLedgerAccounts.AccountCode == TableGroupAll::GroupId && vendLedgerAccounts.Num == vendTable.VendGroup)
|| (vendLedgerAccounts.AccountCode == TableGroupAll::All))
&& ((vendTrans.PostingProfile != "" && vendLedgerAccounts.PostingProfile == vendTrans.PostingProfile)
|| (vendTrans.PostingProfile == "" && vendLedgerAccounts.PostingProfile == defaultPostingProfile))
join dimensionAttributeValueCombination
where dimensionAttributeValueCombination.RecId == vendLedgerAccounts.SummaryLedgerDimension
join maxOf(MainAccountId), maxOf(Name) from mainAccount
where mainAccount.RecId == dimensionAttributeValueCombination.MainAccount;
Exception....................................
Cannot execute a data definition language command on Suppliers (VendProvisionalBalanceTmpProcessing).
The record already exists.
INSERT INTO tempdb."DBO".t102589_7C94D52689AC46EDA4076E437812B9A7 (ACCOUNTNUM,POSTINGPROFILE,CURRENCYCODE,VENDACCOUNTNAME,MAINACCOUNTID,MAINACCOUNTNAME,RECVERSION,PARTITION) SELECT T1.ACCOUNTNUM AS f1,T2.POSTINGPROFILE AS f2,T2.CURRENCYCODE AS f3,MAX(T3.NAME) AS f4,MAX(T6.MAINACCOUNTID) AS f5,MAX(T6.NAME) AS f6,1 AS RECVERSION,5637144576 AS PARTITION FROM VENDTABLE T1 CROSS JOIN VENDTRANS T2 CROSS JOIN DIRPARTYTABLE T3 CROSS JOIN VENDLEDGERACCOUNTS T4 CROSS JOIN DIMENSIONATTRIBUTEVALUECOMBINATION T5 CROSS JOIN MAINACCOUNT T6 WHERE ((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'rmlp')) AND (((T2.PARTITION=5637144576) AND (T2.DATAAREAID=N'rmlp')) AND (T2.ACCOUNTNUM=T1.ACCOUNTNUM)) AND ((T3.PARTITION=5637144576) AND (T3.RECID=T1.PARTY)) AND (((T4.PARTITION=5637144576) AND (T4.DATAAREAID=N'rmlp')) AND (((((T4.ACCOUNTCODE=0) AND (T4.NUM=T2.ACCOUNTNUM)) OR ((T4.ACCOUNTCODE=1) AND (T4.NUM=T1.VENDGROUP))) OR (T4.ACCOUNTCODE=2)) AND (((T2.POSTINGPROFILE<>'') AND (T4.POSTINGPROFILE=T2.POSTINGPROFILE)) OR ((T2.POSTINGPROFILE='') AND (T4.POSTINGPROFILE=N'General'))))) AND ((T5.PARTITION=5637144576) AND (T5.RECID=T4.SUMMARYLEDGERDIMENSION)) AND ((T6.PARTITION=5637144576) AND (T6.RECID=T5.MAINACCOUNT)) GROUP BY T1.ACCOUNTNUM,T2.POSTINGPROFILE,T2.CURRENCYCODE ORDER BY T1.ACCOUNTNUM,T2.POSTINGPROFILE,T2.CURRENCYCODE
(S)\Classes\xInfo\add
(S)\Classes\Info\add - line 94
(S)\Classes\VendProvisionalBalanceDP\processReport - line 56
(S)\Classes\SrsReportProviderQueryBuilder\initialize - line 59
(S)\Jobs\
Best Regards.