Hi
I have a sql query which I want to make it as a stored procedure. How shall use Union operation in the stored procedure.
Here is My query.
select state_id owner_id,'state_id' owner_type
from campus
where site_id='7001'
and state_id is not null
union
select district_id owner_id,'district_id' owner_type
from campus
where site_id='7001'
and district_id is not null
Thanks for your help.
I have a sql query which I want to make it as a stored procedure. How shall use Union operation in the stored procedure.
Here is My query.
select state_id owner_id,'state_id' owner_type
from campus
where site_id='7001'
and state_id is not null
union
select district_id owner_id,'district_id' owner_type
from campus
where site_id='7001'
and district_id is not null
Thanks for your help.