Skip to content

Tag: sql-server

How to Run Two T-Sql Statement By Exec Command in SqlServer?

I want run 2 SQL queries in Exec instruction, how can I do this? ListOfLeaveRemainingInfo is a user-defined table type: When I run the stored procedure, I get this error: Msg 1087, Level 15, State 2, Line 33 Must declare the table variable “@LeaveRemainingTempTable” Answer Scratch the previous. @L…

SQL Joins for Multiple Fields with Null Values

I have a table of maintenance requirements and associated monthly frequency it is to be performed maint I also have a table of equipment with data on its manufacturer, model, device type and building. equip I am trying to match each maintenance requirement with its associated equipment. Each requirement appli…