I have 6 tables that I need to 1st run an update statement on, then a select statement on. Currently my code has been -- is there a way to reduce the code and speed this up?
Update Ice.dbo.ReyjavikStore Set MangerCheck = 'Yes', ManagerCheckDate = GetDate() WHERE ManagerCheck IS NULL AND supervisorCheck IS NOT NULL
--then of course there would be subsequent table names below
Create table #NeedsManagerReview
Insert into #NeedsManagerReview(ID, salesManName, ItemSold, quantity, SaleTotal, StoreName)
SELECT salesManName, ItemSold, Quantity, SaleTotal, Storename FROM Ice.dbo.ReyjavikStore
Where managerReview IS NOT NULL
--Then of course subsequent Insert into statements
--Once all Update & Select statements have been Run
Select * from #NeedsManagerReview
Drop Table #NeedsManagerReview
Edited byIndigoMontoyaFriday, November 15, 2013 9:51 PMerror in Select Statement
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.