高手们,近来看看我的sql语句吧!!
declare @aa varchar(1000)
declare @strSql varchar(2000)
@strSql= 'select @aa=(Address + Name )from crm_Customer WHERE ID =1000 '
exec(@strSql)
print @aa
请帮我排排错。。。。。。。。。。。万分感激!
[解决办法]
declare @aa varchar(1000)
declare @strSql varchar(2000)
SET @aa= 'aass '
set @strSql= 'select '+ @aa + ' =(Address + Name ) from crm_Customer WHERE ID =1000 '
exec(@strSql)
--print @aa
print @strSql
[解决办法]
@strSql= 'select @aa=(Address + Name )from crm_Customer WHERE ID =1000 '
这段错误很多
[解决办法]
similarly answer below:
HTTP://www.ebigear.com/Fund/PlayNews.php?NewsID=28340&ID=285885
[解决办法]
declare @aa varchar(1000)
set @aa= 'select (Address + Name )from crm_Customer WHERE ID =1 '
exec(@aa)
[解决办法]
id=1000