请问下下面这句SQL语句有什么错误咯?
LLendQuery.SQL.Add( 'Select * from Lend where is return = N and (CardNo = '+QuotedStr(LCardEdit.Text));
LLendQuery.SQL.Add( 'Select * from Lend where is return = ' 'N and ' '(CardNo = '+QuotedStr(LCardEdit.Text));
上面这2条语句都是错误的。 请问下这是为什么呢?
但是
LLendQuery.SQL.Add( 'Select * from Lend where CardNo = '+QuotedStr(LCardEdit.Text));
这句是对的。 难道多条件查询就这么糟糕?
------解决方案--------------------try
LLendQuery.SQL.Add( 'Select * from Lend where [return] = ' 'N ' ' And CardNo = '+QuotedStr(LCardEdit.Text));