Ejecución de un Select construido
Publicado por Arturo (7 intervenciones) el 27/02/2006 19:56:36
Hola que tal, me gustaría saber como podría ejecutar un selec construido lo tengo de la siguiente manera:
Declare @x nvarchar(100)
Set @x = (Select 'Select * from ' + dbo.valor('Servidor') + '.dbo.SFGC2.Bancos'
from catConstante
Where Indice = '8')
Select @x
exec (@x)
gracias por su ayuda.
Declare @x nvarchar(100)
Set @x = (Select 'Select * from ' + dbo.valor('Servidor') + '.dbo.SFGC2.Bancos'
from catConstante
Where Indice = '8')
Select @x
exec (@x)
gracias por su ayuda.
Valora esta pregunta


0