Sometimes there is a need to store a SQL query output to a
variable in store procedure. This feature gives programming flexibility to
apply more action while generating output.
For example, you can apply more group option in a simple way
which was complicated in a single query or if you want to concatenate the output of some
query etc.
USE [Girfa_Portal]
GO
SET ANSI_NULLS
ON