Option that works on your own PC is to use SQL*Loader . As file name changes every day, you'd use your operating system's batch script (on MS Windows, these are.BAT files) to pass a different name while calling sqlldr
(and the control file).
External table requires you to have access to the database server and have (at least) read
privilege on its directory which contains those.TXT files. Unless you're a DBA, you'll have to talk to them to provide environment. As of changing file name, you could use alter table... location
which is rather inconvenient.
If you want to have control over it, use UTL_FILE
; yes, you still need to have access to that directory on the database server, but - writing a PL/SQL script, you can modify whatever you want, including file name.
Or, a simpler option, first rename input file to SPRReadResponse.txt
, then load it and save yourself of all that trouble.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.