Yes, I can understand that,
but UTL file cannot be used in SQL Server.
you can try this which is similar:
exec master..xp_cmdshell 'isql -U [username] -P [password] -S . -d pubs -q
"select * from employee" -o "c:\result.sql"'
please remember that the options are case sensitive. try executing the query
and u see the output in the file result.sql in the folder "C"
please let me know if u have any questions
please substitute usrname and pwd also
--
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---------------------------------------
Post by Chandra--Open file for writing
v_OutputFileHandle:=UTL_FILE.FOPEN(FileDirectory,FileName,'w',32767);
UTL_FILE.put_line(v_OutputFileHandle,'REM All Rights Reserved.');
I need to migrate the above lines from Pl/SQL to T-SQL for the same
functionality.
Any help??
Post by ChandraHi
You dont have anything like UTL_FILE in SQL Server.
If you want the output to be returned to a disc,
in the query analyer tool,
from the Menu Query > Result to File
if u execute the query in the query analyser, it promps you to output the
file to a flat file
--
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---------------------------------------
Post by Chandrawhat is the alternative for oracle's UTL_FILE in SQL server