select (case when a <>0 then a end) 'a',(case when b <>0 then b end) 'b',(case when c <>0 then c end) 'c',(case when d <>0 then d end) 'd',(case when e <>0 then e end) 'e' from table
调试欢乐多
是否有这样的语句:
adotable1.first;
for i:=1 to adotable1.fieldcount-1 do
begin
if adotable1.fields[i].value=0 then
begin
adotable1.fields[i].drop;//这个语句不行的,有没有别的类似的?
end;
end;
直接table.first,再判断就行了
不知道你是要删除表结构还是暂时使它不显示
如果删表结构,最好还是用query调用sql语句
暂时隐藏的话,则动态创建tfield
如果值为0则跳过
一个table先查循,得到所有字段
再在另一个table中修改
两个table连接一个表?能说明白点么?我的问题是怎样删除这个字段,如果还要再建一个临时表的话就不必了。