# Automation Designer: Export Dataset new feaure

**URL:** <https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109>\
**Category:** Toad for Oracle - Beta\
**Created:** [September 8, 2023, 9:47pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109 "2023-09-08T21:47:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 8, 2023, 9:47pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/1 "2023-09-08T21:47:36Z")

</div>

Hello,

I just wanted to make a quick post about something coming in Monday's beta. Something that few people will find unless it's documented somewhere.

When using SQL Files as the query source, you can right-click on the filename box and choose "Variables". Until now, variables here were meant as part of the file name, like `c:\temp\%my_awesome_variable%\test.sql`. That works.

What does NOT work, until now, is using this variable as a means to pass a parameter into the SQL file. Like so:

![image](https://global.discourse-cdn.com/quest/original/2X/b/b75f5e384ed36a03f2d6e8e541f9f931fc17a18e.png)

In which case, the corresponding SQL File would reference the first parameter as `&1`, the second as `&2`, and so on. For example:

![image](https://global.discourse-cdn.com/quest/original/2X/c/c5f2ad274e1e95db66b5fa411c2c3168b19cda3c.png)

I hope someone finds this helpful.

-John

---

<div class="post-metadata">

**Author:** ![r.kayastha](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@r.kayastha](https://forums.toadworld.com/u/r.kayastha)\
**Post date:** [September 13, 2023, 8:14am UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/2 "2023-09-13T08:14:24Z")

</div>

Noted. This is brilliant!  
Thanks!

---

<div class="post-metadata">

**Author:** ![UserL1](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@UserL1](https://forums.toadworld.com/u/UserL1)\
**Post date:** [September 23, 2025, 2:28pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/3 "2025-09-23T14:28:06Z")

</div>

Thanks @JohnDorlon for the feature.

It works well for one parameter, however I’d be happy to have some guidance for using two variables

I’m using this setup:

 ![image](https://global.discourse-cdn.com/quest/original/3X/f/c/fcc766155f05b1f50f0c7179c46d3ab5886b272c.png)

The script debug.sql has the following content:

`SELECT '&1', '&2' FROM DUAL`

According to the SQL trace it gets executed as follow:

`SELECT 'a b', '&2' FROM DUAL`

Trying out a few other conventions like puting the substitution variable in double quotes also lead to results different than what I expect. I’m expecting this query to be executed

`SELECT 'a', 'b' FROM DUAL`

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 23, 2025, 5:36pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/4 "2025-09-23T17:36:21Z")

</div>

Which Toad version do you have?

---

<div class="post-metadata">

**Author:** ![UserL1](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@UserL1](https://forums.toadworld.com/u/UserL1)\
**Post date:** [September 23, 2025, 5:39pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/5 "2025-09-23T17:39:08Z")

</div>

I’m using version 2024R2

More details:

> TOAD FOR ORACLE BASE EDITION ENTERPRISE TERM LICENSE/MAINT Base Edition (64-bit)  
> 24.2.275.4664

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 23, 2025, 6:00pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/6 "2025-09-23T18:00:24Z")

</div>

I just tried it and for me it worked as expected.

I think your %TRAD.VALUEA% is set to A and your %TRAD.VALUEB% is blank.

This is what I did (using built in variables)

 ![image](https://global.discourse-cdn.com/quest/original/3X/4/c/4c829efbabb4dd8203596e4ac80de66ef49a8135.png)

 ![image](https://global.discourse-cdn.com/quest/original/3X/1/e/1e6ec80ce4ff98eecbfd6ff4cc64cc3bd1566380.png)

my file looks like this:

select '&1' as first\_col, '&2' as second\_col  
from dual;

and after I ran it I had this in the clipboard  
FIRST\_COL,SECOND\_COL  
9/23/2025 AZURE\_12CR2\_PLUG,&2

---

<div class="post-metadata">

**Author:** ![UserL1](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@UserL1](https://forums.toadworld.com/u/UserL1)\
**Post date:** [September 23, 2025, 7:02pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/7 "2025-09-23T19:02:19Z")

</div>

Thanks for the analysis.

In your example I see the following output:

> FIRST\_COL,SECOND\_COL  
> 9/23/2025 AZURE\_12CR2\_PLUG,&2

I understand this means that the substitution variable &1 contains both parameters and &2 is empty.

I was however expecting to see that output instead:

> FIRST\_COL,SECOND\_COL  
> 9/23/2025, AZURE\_12CR2\_PLUG

In other words, I’m wondering how to provide the parameters so that the substitution variables are allocated as follow:

- 1 = SYSDATE
- 2 = ACTIVESESSIONDB

Do you know what adjustment is required to achieve that output where both substitution variables are set?

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 23, 2025, 8:06pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/8 "2025-09-23T20:06:15Z")

</div>

Oops, you're right! I didn't even notice the &2 in what I pasted. Sorry about that.

It seems there is some bug here. I'll have to take a look at the code and get back to you.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 23, 2025, 10:06pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-new-feaure/58109/9 "2025-09-23T22:06:51Z")

</div>

This will be fixed in the next beta.
