# Scripting and passing parameters

**URL:** <https://forums.toadworld.com/t/scripting-and-passing-parameters/2491>\
**Category:** Toad Data Modeler\
**Created:** [April 21, 2011, 8:17am UTC](https://forums.toadworld.com/t/scripting-and-passing-parameters/2491 "2011-04-21T08:17:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGuy](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@TheGuy](https://forums.toadworld.com/u/TheGuy)\
**Post date:** [April 21, 2011, 8:17am UTC](https://forums.toadworld.com/t/scripting-and-passing-parameters/2491/1 "2011-04-21T08:17:39Z")

</div>

The following script runs ok without a date range, but when I want to add a date range, toad does not ask for them when running and the result CSV file is blank.

When I run my sql in toad directly it stops and ask to input the 2 prompts, but does not when calling toad from command line. How can I do this?

FORMAT=DELIMOTHER  
DELIMCHAR=,  
QUOTES=YES  
COLUMNS=YES  
LOWERCASECOLUMNS=NO  
OUTPUTDIR=c:  
BEGINQRY c:\fitt\export.csv  
SELECT \* FROM IND\_MAINTENANCES  
where pre\_maint\_created\_date between :fromdate and :todate  
ENDQRY  
CLOSETOAD

Guy

---

<div class="post-metadata">

**Author:** ![admin1](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@admin1](https://forums.toadworld.com/u/admin1)\
**Post date:** [April 21, 2011, 8:47am UTC](https://forums.toadworld.com/t/scripting-and-passing-parameters/2491/2 "2011-04-21T08:47:28Z")

</div>

Hi Guy,

may I just know the version of TDM you have installed, please?

Thank you,  
Lukas

---

<div class="post-metadata">

**Author:** ![TheGuy](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@TheGuy](https://forums.toadworld.com/u/TheGuy)\
**Post date:** [April 21, 2011, 8:58am UTC](https://forums.toadworld.com/t/scripting-and-passing-parameters/2491/3 "2011-04-21T08:58:16Z")

</div>

oupss…  
Toad for Oracle 8.6.1.0

---

<div class="post-metadata">

**Author:** ![admin1](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@admin1](https://forums.toadworld.com/u/admin1)\
**Post date:** [April 21, 2011, 9:03am UTC](https://forums.toadworld.com/t/scripting-and-passing-parameters/2491/4 "2011-04-21T09:03:08Z")

</div>

No problem, Guy. Just go on to [http://toadfororacle.com/forumindex.jspa?categoryID=649](http://toadfororacle.com/forumindex.jspa?categoryID=649) and file your question with them.

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![TheGuy](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@TheGuy](https://forums.toadworld.com/u/TheGuy)\
**Post date:** [April 21, 2011, 9:09am UTC](https://forums.toadworld.com/t/scripting-and-passing-parameters/2491/5 "2011-04-21T09:09:13Z")

</div>

Took a left turn when should of gone right…ha ha…sorry…  
Just filed it in the proper forum…

Thanks
