kaveer
2/22/2017 - 4:39 PM

Declare temporary Table

Declare temporary Table

declare  @tmpJobs table(Id int, 
                        LocationId int, 
                        CategorySectorId int)


insert into @tmpJobs(Id, LocationId, CategorySectorId)
select intAd_id, locationid, categorysectorid 
from fnJobAlertOptionsBySiteID(@SiteID)


--use temporary table
Select tj.LocationId
			,tj.CategorySectorId
From @tmpJobs tj