CREATE PROCEDURE aa
@sheetname nvarchar (10),
@xxcode nvarchar (11)
AS
execute('SELECT *FROM'+@SheetName+' where xxcode like '+@xxcode+'% order by xxcode' )
CREATE PROCEDURE aa
@sheetname nvarchar (10),
@xxcode nvarchar (11)
AS
exec ('SELECT *FROM'+ @sheetname +' where xxcode like '+ @xxcode + '% order by xxcode')
CREATE PROCEDURE aa
@sheetname nvarchar (10),
@xxcode nvarchar (11)= '%'
AS
execute('SELECT *FROM@SheetName where xxcode like @xxcode order by xxcode' )
CREATE PROCEDURE aa
@Sheetname nvarchar (10),--是不是這個大小寫的問題
@xxcode nvarchar (11)
AS
execute('SELECT *FROM'+@SheetName+' where xxcode like '+@xxcode+'% order by xxcode' )
CREATE PROCEDURE aa
@sheetname nvarchar (10),
@xxcode nvarchar (11)
AS
execute('SELECT *FROM'+@SheetName+' where xxcode like'% '+@xxcode+'%'' order by xxcode' )