Stored procedure
I want to create a stored procedure where the procedure will select only selected columns from tables and merge into single output how can i do it? Please give some example...Thanks
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Khargesh RajputRank #616 · 3.9K reputationPosted Mar 18, 2015, 12:22 AM EDT
select (column1+'-'+column2) as multicol from tablename
Anjali C64 reputationPosted Mar 18, 2015, 12:52 AM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted Mar 18, 2015, 1:05 AM EDT
then write stored procedure
create proc sp_multi
as
begin
select (col1+,+col2+,col3) as output from table
end
write query for your table and columns
Vikram AgrawalRank #4,713 · 329 reputationPosted Mar 18, 2015, 1:26 AM EDT
Hi Anjali,
try this
Create Procedure MyProc
As
Begin
Select Column1 + ', ' + Column2 + ', ' + Column3 From MyTable
End