SELECT NULL GenelBilgiler, (CASE WHEN sd.EntryDate IS NULL THEN (Format(sd.ValueDate,…
- User
SELECT NULL GenelBilgiler, (CASE WHEN sd.EntryDate IS NULL THEN (Format(sd.ValueDate, N’MMddyy’)) ELSE sd.EntryDate + Format(sd.ValueDate, N’yy’) END) EntryDate, sd.ValueDate, ra.BankAccountsId, ra.SWIFTCode, ra.AccountNumber, ra.AccountSuffix, LEFT(c.CustomerName,100) CustomerName, f.FecCode, FORMAT((CONVERT(VARCHAR(50),(CASE WHEN DebitCreditCode IN (‘D’,‘RC’) THEN sd.Amount ELSE 0 END) )),‘N2’,‘tr-tr’) StatementDebit, (CASE WHEN DebitCreditCode IN (‘C’,‘RD’) THEN sd.Amount ELSE 0 END) StatementCredit, 0.00 AccountingDebit, 0.00 AccountingCredit, sd.AccountsReference + ’ ’ + sd.InstitutionsReference + ’ ’ + sd.SupplementaryDetails SharedReferanceDetails, sd.InformationToAccountOwner, sd.IdentificationCode, NULL AccSystemDate, NULL AccUserName, NULL ResourceName, NULL BusinessKey FROM BOA.RCC.BankAccounts ra WITH (NOLOCK) JOIN BOA.CUS.Customer c WITH (NOLOCK) ON c.Customerid=ra.AccountNumber JOIN BOA.COR.FEC f WITH (NOLOCK) ON f.FecId=ra.FEC JOIN BOA.RCC.SwiftDebit sd WITH (NOLOCK) ON sd.BankAccountsId=ra.BankAccountsId AND sd.Status=‘U’ WHERE ra.BankAccountsId = 21–(SELECT BankAccountsId FROM #BankAccounts WHERE Id = @Incrementer) AND f.FecGroup IN (0,1) AND ra.IsActive = 1 . Argument data type varchar is invalid for argument 1 of format function hatasını düzeltip tekrar yazar mısın
- Assistant
SELECT NULL GenelBilgiler, (CASE WHEN sd.EntryDate IS NULL THEN (CONVERT(VARCHAR(10),sd.ValueDate, 101)) ELSE sd.EntryDate + RIGHT(CONVERT(VARCHAR(10),sd.ValueDate, 101),2) END) EntryDate, sd.ValueDate, ra.BankAccountsId, ra.SWIFTCode, ra.AccountNumber, ra.AccountSuffix, LEFT(c.CustomerName,100) CustomerName, f.FecCode, FORMAT((CASE WHEN DebitCreditCode IN ('D','RC') THEN sd.Amount ELSE 0 END ),'N2','tr-tr') StatementDebit, (CASE WHEN DebitCreditCode IN ('C','RD') THEN sd.Amount ELSE 0 END) StatementCredit, 0.00 AccountingDebit, 0.00 AccountingCredit, sd.AccountsReference + ' ' + sd.InstitutionsReference + ' ' + sd.SupplementaryDetails SharedReferanceDetails, sd.InformationToAccountOwner, sd.IdentificationCode, NULL AccSystemDate, NULL AccUserName, NULL ResourceName, NULL BusinessKey FROM BOA.RCC.BankAccounts ra WITH (NOLOCK) JOIN BOA.CUS.Customer c WITH (NOLOCK) ON c.Customerid=ra.AccountNumber JOIN BOA.COR.FEC f WITH (NOLOCK) ON f.FecId=ra.FEC JOIN BOA.RCC.SwiftDebit sd WITH (NOLOCK) ON sd.BankAccountsId=ra.BankAccountsId AND sd.Status='U' WHERE ra.BankAccountsId = 21--(SELECT BankAccountsId FROM #BankAccounts WHERE Id = @Incrementer) AND f.FecGroup IN (0,1) AND ra.IsActive = 1
- User
SELECT NULL GenelBilgiler, (CASE WHEN sd.EntryDate IS NULL THEN (Format(sd.ValueDate, N'MMddyy')) ELSE sd.EntryDate + Format(sd.ValueDate, N'yy') END) EntryDate, sd.ValueDate, ra.BankAccountsId, ra.SWIFTCode, ra.AccountNumber, ra.AccountSuffix, LEFT(c.CustomerName,100) CustomerName, f.FecCode, FORMAT((CAST((CASE WHEN DebitCreditCode IN ('D','RC') THEN sd.Amount ELSE 0 END) AS VARCHAR(20) )),'N2','tr-tr') StatementDebit, (CASE WHEN DebitCreditCode IN ('C','RD') THEN sd.Amount ELSE 0 END) StatementCredit, 0.00 AccountingDebit, 0.00 AccountingCredit, sd.AccountsReference + ' ' + sd.InstitutionsReference + ' ' + sd.SupplementaryDetails SharedReferanceDetails, sd.InformationToAccountOwner, sd.IdentificationCode, NULL AccSystemDate, NULL AccUserName, NULL ResourceName, NULL BusinessKey FROM BOA.RCC.BankAccounts ra WITH (NOLOCK) JOIN BOA.CUS.Customer c WITH (NOLOCK) ON c.Customerid=ra.AccountNumber JOIN BOA.COR.FEC f WITH (NOLOCK) ON f.FecId=ra.FEC JOIN BOA.RCC.SwiftDebit sd WITH (NOLOCK) ON sd.BankAccountsId=ra.BankAccountsId AND sd.Status='U' WHERE ra.BankAccountsId = 21 bu sp deki statementDebit kolonunu sonucu ‘999G999G999D99’ formatında verecek şekilde sp yi düzenle
- Assistant
SELECT NULL GenelBilgiler, (CASE WHEN sd.EntryDate IS NULL THEN (Format(sd.ValueDate, N'MMddyy')) ELSE sd.EntryDate + Format(sd.ValueDate, N'yy') END) EntryDate, sd.ValueDate, ra.BankAccountsId, ra.SWIFTCode, ra.AccountNumber, ra.AccountSuffix, LEFT(c.CustomerName,100) CustomerName, f.FecCode, REPLACE(CONVERT(VARCHAR(20), CAST(CAST((CASE WHEN DebitCreditCode IN ('D','RC') THEN sd.Amount ELSE 0 END) AS MONEY),0),1),'.' , 'G') AS StatementDebit, (CASE WHEN DebitCreditCode IN ('C','RD') THEN sd.Amount ELSE 0 END) StatementCredit, 0.00 AccountingDebit, 0.00 AccountingCredit, sd.AccountsReference + ' ' + sd.InstitutionsReference + ' ' + sd.SupplementaryDetails SharedReferanceDetails, sd.InformationToAccountOwner, sd.IdentificationCode, NULL AccSystemDate, NULL AccUserName, NULL ResourceName, NULL BusinessKey FROM BOA.RCC.BankAccounts ra WITH (NOLOCK) JOIN BOA.CUS.Customer c WITH (NOLOCK) ON c.Customerid=ra.AccountNumber JOIN BOA.COR.FEC f WITH (NOLOCK) ON f.FecId=ra.FEC JOIN BOA.RCC.SwiftDebit sd WITH (NOLOCK) ON sd.BankAccountsId=ra.BankAccountsId AND sd.Status='U' WHERE ra.BankAccountsId = 21