Click here to Skip to main content
15,909,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, Can't find out where is syntax error.

SQL
Error performing query 'INSERT INTO BillPayment (StoreID,BillPaymentID,BillPaymentDate,BillNo,BillPaymentProviderID,CustomerID,CarrierID,Notes,BillAmount,IsSalesTax,SalesTaxAmount,IsPaymentTax,PaymentTaxAmount,IsExtraTax,ExtraTaxAmount,IsFee,Fee,FeeCost,Discount,DueAmount,EmployeeID,OnHold,Password,IsBonus,SendAlert,LanguageID,PrintReceipt,ShiftID,IsDeleted,IsPending,IsEnglish,RegisterID,TaxAmount)VALUES (1,8931,'2012-08-15','1914201249844',(SELECT PaymentProviderID FROM BillPaymentProvider LIMIT 1),IFNULL((SELECT CustomerID FROM Customer WHERE PhoneNumber = '(123) 456-7891' LIMIT 1) ,1),IFNULL((SELECT CarrierID FROM Customer WHERE PhoneNumber = '(123) 456-7891' LIMIT 1) ,(SELECT CarrierID FROM Carrier LIMIT 1)),' INSERT INTO BillPayment (StoreID,BillPaymentID,BillPaymentDate,BillNo,BillPaymentProviderID,CustomerID,CarrierID,Notes,BillAmount,IsSalesTax,SalesTaxAmount,IsPaymentTax,PaymentTaxAmount,IsExtraTax,ExtraTaxAmount,IsFee,Fee,FeeCost,Discount,DueAmount,EmployeeID,OnHold,Password,IsBonus,SendAlert,LanguageID,PrintReceipt,ShiftID,IsDeleted,IsPending,IsEnglish,RegisterID,TaxAmount)VALUES (1,8932,'2012-08-15','1914201249844',(SELECT PaymentProviderID FROM BillPaymentProvider LIMIT 1),IFNULL((SELECT CustomerID FROM Customer WHERE PhoneNumber = '(347) 975-7200' LIMIT 1) ,1),IFNULL((SELECT CarrierID FROM Customer WHERE PhoneNumber = '(347) 975-7200' LIMIT 1) ,(SELECT CarrierID FROM Carrier LIMIT 1)),' ',20,0,0.0000,(CASE 0 WHEN 0 then 0 else 1 END),0,(CASE 0 WHEN 0 then 0 ELSE 1 END),0,(CASE 0 WHEN 0 THEN 0 ELSE 1 END),0,0,0.0000,20,1,0,'',0,1,1,1,1,0,(CASE '1914201249844' WHEN '' THEN 1 ELSE 0 END),1,1,0); ': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2012-08-15','1914201249844',(SELECT PaymentProviderID FROM BillPaymentProvider L' at line 1

ROLLBACK
Posted

1 solution

You need to add a space after the closing parenthesis of your column list and before the "Values" declaration at all occurrences.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900