-
How to Concatenate a long with varchar in a SELECT statement?
Hi, I would like to concatenate a long with varchar in order to generate a sql script by using sql*plus.
This is my code:
SPOOL RES.TXT
SELECT 'CREATE TABLE '||TABLE_NAME||' AS ('||QUERY||' WHERE 1=0)' FROM DBA_SNAPSHOTS WHERE OWNER='MAZINGER';
SPOOL OFF
I cannot concatenate the field QUERY with the rest of the information ('CREATE TABLE ...') because it has the datatype LONG.
Any ideas to solve this problem?
Thanks in advance.
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|