select format( count(YGZ_MC)*100 / ( select count(YGZ_MC) from tablename where JZJTSJTS =0 ) ,"#.00" ) + "%" as 户数占比 from tablename where JZJTSJTS =0
主要卡在 ,"#.00" ) + "%" 这块的转换上了,上面的代码在SQL查询分析器中好用,想转成delphi 中代码 string 存储;string a := ' ';
请高手指教。
主要卡在 ,"#.00" ) + "%" 这块的转换上了,上面的代码在SQL查询分析器中好用,想转成delphi 中代码 string 存储;string a := ' ';
请高手指教。
解决方案 »
- delphi中己存在的单元文件在修改后,如何进行重新编译。如OleCtrls.pas文件改了其中的内容,要重新进行编译
- 抢分了
- timage如何显示blob中的图象
- 怎么样向DLL中的MDI子窗体 传递ADO连接?
- 急问一个问题~如何在获得DBGRID里所有行的一个记录相加数
- ■■★★★大家安静!号外号外!★★★■■
- 哪里有Developer QuantumGrid控件下载
- 怎样通过DELPHI窗体标题栏的帮助按钮[bordericons=bihelp]调用帮助文件?
- 问一个较简单的问题
- 如果我要查询数据库中某字段的值包含了分割符,请问这样的SQL怎么写
- 调用VC编写的DLL,Delphi调用时指针转换问题。
- 资源更新及读取问题
string a := 'select format( count(YGZ_MC)*100 / ( select count(YGZ_MC) from tablename where JZJTSJTS =0 ) ,"#.00" ) + "%" as 户数占比 from tablename where JZJTSJTS =0';
SQLText :widestring;
begin
SQLText :='select convert(varchar(5),cast(count(YGZ_MC)*100.00/(select count(YGZ_MC) from tablename where JZJTSJTS=0) as decimal(5,2)))+''%'' as 户数占比 from tablename where JZJTSJTS =0';
//......
end;