这个简单的Select语句在BCB中怎么写才对呢?(我真是糊涂了)

h98458 2004-04-28 03:41:17
在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;

盼各位兄弟解答
...全文
50 2 点赞 打赏 收藏 举报
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
stonewater 2004-04-28
s_sql="select department as \"科室\",SUM(x_money) as \"应收金额\",SUM(y_money) as \"实收金额\"";
  • 打赏
  • 举报
回复
h98458 2004-04-28
不会是DM->IBDataSet2->SelectSQL不支持中文赋值吧??
  • 打赏
  • 举报
回复
相关推荐
发帖
C++ Builder
创建于2007-08-02

1.3w+

社区成员

C++ Builder相关内容讨论区
申请成为版主
帖子事件
创建了帖子
2004-04-28 03:41
社区公告
暂无公告