求Delphi强人帮我看看这句SQL语句

来源:百度知道 编辑:UC知道 时间:2024/06/30 23:52:02
'update timecard set '''+dd+'''=''√'',wid='i',kmonth='month' where username='''+sql+''' and truename='''+tn+'''';

i和month是数值型的,我这引号该怎么括啊,我头都大了
i和month是数值型,在数据库的列中是int型
sql和tn都是字符型,是前面的控件传过来的

'update timecard set dd="√",wid='+inttostr(i)+',kmonth='+inttostr(month)+' where username="'+sql+'" and truename="'+tn+'"';

i和month需要转换为字符串才可以相加。
sql和tn是字符串吧,否则也不可以直接+的。

'update timecard set '''+dd+'''=''√'',wid='+i+',kmonth='+month+' where username='''+sql+''' and truename='''+tn+'''';
这样写也可以呀