Skip to content

Instantly share code, notes, and snippets.

@ypercube
Last active March 16, 2017 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ypercube/7a51e88eede8aff1bd7decfc51174b82 to your computer and use it in GitHub Desktop.
Save ypercube/7a51e88eede8aff1bd7decfc51174b82 to your computer and use it in GitHub Desktop.
ALTER PROCEDURE [dbo].[Providers_Get_All_Spacial_Terms_New]
...
AS
BEGIN
IF Object_id('tempdb..#T') IS NOT NULL
BEGIN
INSERT INTO #T ....
END
ELSE
BEGIN
SELECT ...
INTO #T
END
IF...
BEGIN
SELECT * from #T ...
DROP TABLE #T
END
ELSE
BEGIN
exec Providers_Get_All_Spacial_Terms_New @ParentID,@ServiceGroupID,@ServiceTypeID,@ServiceDate,@PlanCurrency
END
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment