ALTER PROCEDURE ams.Uselection
(
@TableName varchar(50),
@Value varchar(50),
@Text varchar(50)
)
AS
declare @sql varchar(max)
BEGIN
SET NOCOUNT ON
set @sql=('select '+ @Value +','+ @Text +' from '+ 'ams.'+@TableName)
exec(@sql)
set NOCOUNT ON
END
(
@TableName varchar(50),
@Value varchar(50),
@Text varchar(50)
)
AS
declare @sql varchar(max)
BEGIN
SET NOCOUNT ON
set @sql=('select '+ @Value +','+ @Text +' from '+ 'ams.'+@TableName)
exec(@sql)
set NOCOUNT ON
END
No comments:
Post a Comment