This Stored Procedure shows how to create temporary table and insert data into it from another table
--****************************************************
Create procedure sp_tempTable
as
create table #tempTable(ID int,Symbol nvarchar(50)) -- Create #tempTable
insert into #tempTable
select Max(ID) as MaxId,Symbol from Sheet1 Group by Symbol --Insert data from - --Sheet1 table
select * from #tempTable
drop table #tempTable
--**************************************************
--To execute
--exec sp_tempTable
No comments:
Post a Comment