|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I need to write a select statement where the results are listed in a comma separated format.
select table_name from user_tables; I would the result to be listed in one long line with each table name separated by a comma. Any ideas, suggestions? JP |
|
#2
|
|||
|
|||
|
Please try:
select table_name || ',' from user_tables; Cheers, Dan |
|
#3
|
|||
|
|||
|
Sorry but that will only put a comma after each table name.
|
|
#4
|
|||
|
|||
|
DECLARE @Tables VARCHAR(5000)
SELECT @Tables = COALESCE(@Tables + ', ', '') + table_name FROM user_tables SELECT @Tables |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > How to create a csv type output via a select statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|