怎么样在程序拼凑pro*c的sql语句啊?windows里用ado的话直接可以执行拼凑完的语sql语句,可是pro*c是要经过编译才能用的,我要怎么实现类似的思路啊?
如比下面的伪代码
string strSQL;
strSQL = "Select distinct AlarmType,TypeDesp " +
"from TblAlarmAction "
if(条件)
{
strSQL+="where AlarmID=变量1 and ... }
else
strSQL+="where AlarmID=变量2 and ...
如比下面的伪代码
string strSQL;
strSQL = "Select distinct AlarmType,TypeDesp " +
"from TblAlarmAction "
if(条件)
{
strSQL+="where AlarmID=变量1 and ... }
else
strSQL+="where AlarmID=变量2 and ...
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货