Creating Comma Seperated Lists
From TekiWiki
This whole wiki has now moved to http://www.springboardsolutions.com/wiki
Go to this page Creating Comma Seperated Lists
| Line 29: | Line 29: | ||
) | ) | ||
start with rn = 1 | start with rn = 1 | ||
| - | connect by prior rn = rn | + | connect by prior rn+1 = rn |
and prior table_name=table_name | and prior table_name=table_name | ||
and prior owner=owner | and prior owner=owner | ||
| Line 43: | Line 43: | ||
) | ) | ||
start with rn = 1 | start with rn = 1 | ||
| - | connect by prior rn = rn | + | connect by prior rn+1 = rn |
and prior table_name=table_name | and prior table_name=table_name | ||
and prior owner=owner | and prior owner=owner | ||
| Line 52: | Line 52: | ||
== Query Results into Comma Separated Values == | == Query Results into Comma Separated Values == | ||
| - | In SQL Plus, a CSV file can be created from the results of a query by | + | In SQL Plus, a CSV file can be created from the results of a query by changing the column separation (colsep): |
<pre> | <pre> | ||