SqlDbx Forum

SqlDbx

You are not logged in.

#1 2013-02-01 17:42:47

likes340darts
Member

How to use cursor routine when outputting columns which go to Excel as

When you do select, row(s) with columns results are returned. If you click Excel, excel launched and each column from sql results is separate column.

So that is fine. But in cases where going to be using cursors etc to perform logic and then want results, it produces results as one text string. Was using print and + for concat the columns and then realized when going to Excel just one column of text with many columns in the one text field. Don't want that - want x columns not one. trying to find something different than print so that results are still separate columns such that when I go to Excel, each column is separate like when do regular sqls.

Help

Thanks

Offline

#2 2013-02-04 10:46:42

sqldbxhelp
Administrator

Re: How to use cursor routine when outputting columns which go to Excel as

You have to create result set inside your stored procedure.
You can use temporary table or return table from your procedure

Offline

#3 2013-02-06 16:53:28

likes340darts
Member

Re: How to use cursor routine when outputting columns which go to Excel as

done thanks for your help!!

Offline

Board footer

Powered by FluxBB