spool test.csv
set colsep ";"
set pagesize 0
set linesize 10000
SELECT A, B, C
FROM TB_AA
INNER JOIN TB_BB
ON TB_BB.ID = TB_AA.EXT_ID
WHERE TB_AA.FOO = 4;
spool off
exit
Once this is done we can use this command to run the script we have just created:
$ sqlplus user/passwor@
At this point we will obtain as result a file (test.csv) in our folder.
No comments:
Post a Comment