在sql中使用update更新记录
例如:update table1 set field1=substring(field2,1,2)目的是将feild2中取前两个字符赋予field1,可提示没有定义substring,应该用什么函数?哪里有数据库支持的函数集资料,求教! (ado驱动)
例如:update table1 set field1=substring(field2,1,2)目的是将feild2中取前两个字符赋予field1,可提示没有定义substring,应该用什么函数?哪里有数据库支持的函数集资料,求教! (ado驱动)
query.sql.clear;
query.sql.add('update table1 set field1=substring(field2,1,2)')
query.ExecSQL;提示没有定义substring! 为什么?
query.sql.add('update table1 set field1=:a1')
query.parameters.parambnname('a1').value:=copy(field2,1,2);
query.ExecSQL;//用一下delphi中的copy函数