gjshah7254
3/8/2016 - 11:23 PM

Store SQL query in a variable and resuse it

Store SQL query in a variable and resuse it

with supp as ( 
Select 			
			Fieldname            
      From Table
	  WHERE 
	  Something
	  )

SELECT * from supp where FieldName = 1