Stored Procedures using utl_file
832779Jan 16 2012 — edited Jan 16 2012Hi guys
I am new to stored procedures and i have pretty much been given a task to create a procedure, would appreciate it if you guys could help me out.
Write a stored procedure that creates a comma separated flat file called ‘GradChallenge’ followed by today’s date formatted ‘yyyymmdd’ and add the extension ‘.txt’.
The file will contain the ID, LOGINNAME, FORENAME and SURNAME of the USERS table. The header will consist of today’s date in the format ‘yyyymmdd’ and the footer will contain a row count.
I have been told i can use a UTL_FILE, i have the users table pretty much set up, and require the above columns to be extracted using the stored procedure into a text file.
I hope this make sense and would appreciate your time to help me out.
Many Thanks :)
P:S i am using oracle sql developer and microsoft sql server 2005