declare @g_Condi2 varchar(1000)
set @g_Condi2= 'and State = ''在职'''
select name,sex,address,photo,state from t_name
where name='张三'+@G_Condi2
为什么不能执行?应该怎样解决.
set @g_Condi2= 'and State = ''在职'''
select name,sex,address,photo,state from t_name
where name='张三'+@G_Condi2
为什么不能执行?应该怎样解决.
解决方案 »
- 在Object Inspector 中看到ADOTable 组件的Connection属性。而ADOTable组件源代码里为什么没有写?
- 请问怎么在程序里实现备份压缩一个数据库,然后解压恢复它,请给出例程,特别是解压恢复!!!!!
- delphi 可以用ADO连接Microsoft Access吗?
- 请教VC和Delphi的Socket通信?
- 找些做技术支持的试题!
- 为什么我用Rave Reports 5.0做报表出现List index out of bounds(0)错误
- 人民币求购源代码
- 怎样给MEMO框加入倒数标签?
- 状态栏
- 关于时间在数据库里面的运用问题??
- !!!!!!求存储过程返回结果集写法!!!!!!!!!!!!!!!!
- tadoquery 内存释放
set @g_Condi2= 'and State = ''在职'''
exec('select name,sex,address,photo,state from t_name
where name=''张三'''+@G_Condi2+'');
declare @g_Condi2 varchar(1000)
set @g_Condi2= 'and State = ''在职'''
create table #test
(name varchar(10),
sex bit,
address varchar(100),
photo image,
state bit
)insert into #test
exec('select name,sex,address,photo,state from t_name
where name=''张三'''+@G_Condi2+'');select * from #test