Oracle dynamically generating spool file name




















If so, how? Generally, yes. If you specify your requirements, someone on the list will be able to help you. Thanks Regards Ajay K. Anirban Dey Posted October 25, 0 Comments. Shriram Mohite Posted October 26, 0 Comments. Garg Dell — Global Devt. The datestamp used to make the filename unique each time I went through this for weeks to automate a script to produce oracle invoices…..

Anirban Dey Posted October 27, 0 Comments. Thanks George!! For sharing your valuable scripts with us. Roopam Agarwal Posted January 28, 0 Comments. Questions Dynamic Spool File Name. Question and Answer. Thanx Fareed. June 24, - pm UTC. But I also rely on ";" working - I rely on the defaults being in place.

Everywhere As does everyone pretty much. Connect and share knowledge within a single location that is structured and easy to search. I need to give the spool file name dynamically and I have to pass the parameters when I call sqlplus.

Below is what I tried. Below is how my script. You are passing the values you want to form your spool file path and name as arguments to your script, but you need to refer to them as positional parameters:. Or if you're going to reuse them for something else you could define your own variable, set from the positional parameters:. The spool file path will be relative to the directory you're in when you run the script.

If that isn't what you want then put the root before the first substitution variable in the spool command, whichever form you use. You could also include the exit in your. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. I need the results of the generated dynamic sql into a CSV file, though.

Here, "myfilename. So you have a problem there ; Can you step back a bit and explain what it is you're trying to do? Ditto Ditto 3, 1 1 gold badge 11 11 silver badges 28 28 bronze badges. Added more detail in the original post, so hopefully it'll help clear things up. I see your updates, and based on that, I'd recommend reading over Boneist's answer That's likely the direction you'll want to go.

There are other "More complex" solutions.. Show 1 more comment. First you need to construct a sql dynamically using spool. And then execute it. RoshP RoshP 9 1 1 silver badge 4 4 bronze badges. How do I get the contents of myscript.



0コメント

  • 1000 / 1000