求一SQL语句:在SQL中引用函数! 找傻瓜进销存
select * from table1 where leftstr(,fieldname,2)=''02''
2楼: 用SQL Server本身的SubString不行吗? 如超市管理软件
3楼: 我是用ACCESS呀,再说用标准SQL不更好吗!祝你好运!
4楼: select * from table1 where left(fieldname,2)=''02''
5楼: select * from table1 where Left(fieldname,2)=''02''
6楼: 按你那样的话,like ''02%''不也行啊。
仓库管理软件版7楼: 请问大侠们:对于copy等一些DELPHI函数如何引用呢?
8楼: 为什么非要用Delphi函数
9楼: delphi的函数在sql命令里用不了!!!
like ''02%''应该可以!
10楼: Mid(string, start[, length])
11楼: 东风在说,如果我不是”02“,而是取出数据库中的一个数据呢?即
select * from table1 where leftstr(fieldname,2)=adoquery.fieldname[''field''];
12楼: SQL内置那么多函数,足以完成这样的任务。可以先用delphi的函数对数据进行处理,然后拼接一个AnsiString,其中包含合法的sql语句。 如傻瓜进销存
13楼: select * from table1 where left(fieldname,2)=''02''
select * from table1 where fieldname like ''%02%''
仓库管理软件版14楼: select * from table1 where left(fieldname,2)=''02''
select * from table1 where fieldname like ''%02%''
15楼: shuaishuai,可不可以将“02”使用变量替换吗?应该怎样写!
16楼: select * from dbo.func("params")
17楼: 用SQL函数就可嘛!
18楼: 结贴吧,没人回答了!