Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HowDoI create csv files for sqlldr testing?

Status
Not open for further replies.

raygg

Technical User
Jun 14, 2000
397
US
HowDoI create csv variable length test files to simulate very large files that will be loaded via sqllder? The twist is that instead of commas as the separator the files use x'1c'.
 
Would a spool on a SQL statement work??

i.e. select col1||'x''1c'''||
col2||'x''1c'''||
from ....

if you wanted to limit the size of the file produced then you could stick a &quot;and rownum < X&quot; at the end of the query.


 
If I understand the question you can create the file ok, but are wondering how to generate the x'1c' values as separators. I think x'1c' is equivalent to chr(28), so maybe you can adopt Mike's spool suggestion with this function.

select col1 || chr(28) || col2 ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top