incorrect syntax near ',' ..
I am having an error executing this query.
Delete from customerpayment wher开发者_JS百科e customerid = 8, Paymentid = 1 , currentpayment = '132', startdate = '1/1/2011', enddate = '12/31/2011', status = 'Paid';
Use and instead of , and your query should work.
More precisely:
delete from customerpayment where customerid = 8 and Paymentid = 1 and currentpayment = '132' and startdate = '1/1/2011' and enddate = '12/31/2011' and status = 'Paid';
A few suggestions: it seems you're using string data structure for representing dates. This is bad practise and you should use your database's internal date structure for things like this.
If currentpayment is always a number, don't use string.
If you have only few possible status values, rather use a different table with all possible status values and then join it based on id.
加载中,请稍侯......
精彩评论