mysql - Error in last line near end -


While I perform an archived procedure, I do not know why the error appears in the previous row ... Any of me Error can not be found

The error is saying

  Error 1064 (42000): There is an error in your SQL syntax; To use '' near line 60, check the manual related to your MySQL server version for the correct syntax ''   

_

  process 'party Balance Vivbilederaidi' (p_ledgerId varchar (50), start p_crOrDr varchar (50), p_branchId varchar (50)) (p_crOrDr = 'Dr') then select TEMP.voucherNo + '_' + TEMP.voucherType ID, TEMP.voucherType, the case when, as in select (TEMP.voucherType = 'receipt voucher') then (Select receipt tbl_ReceiptMasterWhere (receiptMasterId = TEMP.voucherNo)) from Mastreed purchased (Kridmastra D tbl_PurchaseMaster WHERE (purchaseMasterId = TEMP.voucherNo)) end in the form of vouchers, the amount of CAST (CAST (TEMP.balance Disiaisiel (24,2) AS AS four (27)) (SELECT A.VoucherNo, A.VoucherType , (SUM (ifnull (A.credit, 0)) - SUM (ifnull (A.dibt, 0))) ou as (A.voucherType = 'purchase invoice or A.voucherType =' receipt vouchers ") and A.ledgerId = p_ledgerId and A.branchId = p_branchId and A.optional = A.voucherNo by 'false' Group as the balance tbl_PartyBalance, A.vouche RType) aS Temp WHERE TEMP.Balance & gt; 0; Select Temp.voucherNo + '_' + Temp.voucherType ID, Temp.voucherType, Case when Temp.voucherType = 'Payment Voucher' then (tbl_PaymentMaster WHERE from SELECT paymentMasterId (paymentMasterId = TEMP.voucherNo)) ELSE (SELECT salesInvoiceNo FROM tbl_SalesMaster Where (salesMasterId = TEMP.voucherNo)) end voucherNo, cast (as the sum of the cast (decimal as TEMP.balance (24,2)) in four (27)) (select A.voucherNo , A.voucherType, (sum (Ifnull (a debit, 0)) - sUM (ifnull (A.credit, balance tbl_PartyBalance as 0))) aS a WHERE (A.VoucherType = 'sales invoice' or A. VoucherType = 'Payment Voucher' AA voucherType = 'Job Invoice') and A.ledgerId = p_ledger Id and A.branchId = p_branchId and A.optional = 'false' A.voucherNo, A.voucherType) TEMP. 0; END    

Try with this I have updated some changes END If and ; etc.

  Create a process of `PartyBalanceViewByLedgerId` (p_ledgerId varchar (50), p_crOrDr varchar (50), p_branchId varchar (50)) start (p_crOrDr = 'Dr') select Temp.voucher not + '_' + Temp.voucherType aS ID, Temp.voucherType, when (TEMP.voucherType = 'receipt voucher') and (sELECT tbl_ReceiptMaster WHERE (receiptMasterId = TEMP.voucherNo) from receiptMasterId) or (tbl_PurchaseMaster Select purchaseMasterId from where (purchaseMasterId = TEMP.voucherNo)) as the amount from the end voucherNo, cast (Cast (TEMP.balance as decimal (24.2)) as four (27)) .voucherNo, as a .voucherType, (sum (ifnull (A.credit, 0)) - yoga (ifnull (A.deb) It, 0))) as a form where a (A.voucherType = 'balance of the purchase invoice or tbl_PartyBalance A.voucherType =' receipt voucher ') and A.ledgerId = p_ledgerId and A.branchId = p_branchId and Apasnl = 'False', not by Group A voucher, type of aouure type) Temp.Balance & gt; as AASAMAP. 0; Select Temp.voucherNo + '_' + Temp.voucherType ID, Temp.voucherType, Case when Temp.voucherType = 'Payment Voucher' then (tbl_PaymentMaster WHERE from SELECT paymentMasterId (paymentMasterId = TEMP.voucherNo)) ELSE (SELECT salesInvoiceNo FROM tbl_SalesMaster Where (salesMasterId = TEMP.voucherNo) end voucherNo, cast (as the decimal (24.2) in the form of TEMP.balance (27)) as the amount from (Selection A.Voucher No , A.voucherType, (sum (ifnull (A.debit, 0)) - Yoga (ifnull (A.credit, 0))) as a where (A.voucherType = 'Sales Invoice' or A.voucherType = ' VoucherType = 'Job Invoice' as a Balance With Payment Voucher'or A tbl_PartyBalance) R. A.ledgerId = p_ledgerId and A.branchId = p_branchId and A.optional = 'False' A.voucherNo, A.VoucherType) Temporarily by group as TEMP.Balance & gt; 0; end if; End;    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -