如题:
数据库的结构是这样的,只有一个字段“数值”数值
2456797
2349513
6786943
2345697
...
过滤后,得出的结果为2456797。 都是含有三个偶数的记录,既不是二个,也不是四个。
2345697
数据库的结构是这样的,只有一个字段“数值”数值
2456797
2349513
6786943
2345697
...
过滤后,得出的结果为2456797。 都是含有三个偶数的记录,既不是二个,也不是四个。
2345697
解决方案 »
- 这个SQL 语句 是 怎么回事啊.......
- 一个语句不明白原因!
- 请教:这样的报表怎么做?我用fastreport
- 又见倒粪贴!大家共赏~~~~~~~~~~~~~~~~~~
- 关于fastreport中memo数据长度变大后,数据的走向问题。
- 请教高手们一个ActiveX的问题
- 我枚举一个游戏窗体的类,只得到了TDXDraw,我怎样才能得到TDXDraw中更多的信息呢,比如得到其中的文字?
- 简单的AT命令问题. 100分求助~~~~
- 用shellexecute如何打开一个exe文件????
- user.dat文件格式是什么,怎么读?
- 超难度的界面,不信的可以试试~
- 手机数据线主要用处是什么?从开始方面考虑。
* from where
(case when substring(数值,1,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,2,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,3,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,4,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,5,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,6,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,7,1) in('0','2','4','6','8') then 1 else 0 end)=3
* from 表名 where
(case when substring(数值,1,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,2,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,3,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,4,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,5,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,6,1) in('0','2','4','6','8') then 1 else 0 end)+
(case when substring(数值,7,1) in('0','2','4','6','8') then 1 else 0 end)=3
这是标准的SQL语句吗
i:integer;
count:integer;
a:string;
with adoquery1 do
begin
sql.clear;
sql.add('select * from table');
open;
while not eof do
begin
a:=Fieldbyname('数值')
for i:=0 to length(a)-1 do
begin
if strtoint(a[i])div 2 = 0 then//是偶数
count=count+1;
end;
if count=3//含有3个 then
listview.items.add('a');//提取出来;
next;
end;
end;
自己加上listview1这个控件,其他的也可以
=================
if count=3 then//含有3个
listview1.items.add('a');//提取出来;
你用的是标准的SQL 语句吗