这个简单的Select语句在BCB中怎么写才对呢?(我真是糊涂了)
在IB的IBConsole这样写没有问题:
select department as "科室",SUM(x_money) as "应收金额",SUM(y_money) as "实收金额" from inspection_info group by department
可在BCB中这样赋值就错了,应该怎么写才对呢?就出错在这个中文别名上("科室","应收金额","实收金额"怎么用引号才正确呀?)
s_sql="select department as '科室',SUM(x_money) as '应收金额',SUM(y_money) as '实收金额'";
s_sql=s_sql+" from inspection_info group by department";
DM->IBDataSet2->Close();
DM->IBDataSet2->SelectSQL->Clear();
DM->IBDataSet2->SelectSQL->Add(s_sql);
DM->IBDataSet2->Active=true;
盼各位兄弟解答