Toad World® Forums

Execution a query located on windows from the toad

I want execute a query located in my drive c:\ of windows 10, in a consola the query is executed as an example: @query.sql

Will are know how make de executions de querys located in drive c:\ from the toad?

Thank.

You can enter @c:\query.sql and then run it with F5 (as script) but if you just want to run the SQL with F9, (as a single statement, not a script), then you can drag the file into the editor or use File->Open, then F9.

Hello John, very grateful for your answer.

The point is that I have a script to execute with F5 and within this invoke a query passing it some parameters, as if it were a command line

Example: SQL> @ query.sql param1 param2

And this would give me an output according to the parameter that I enter.

I share a print screen about the query.

Toad does allow you to pass parameters in the way John mentions. See snap below. I think the only caveat is that you'll need to specify your arguments within the file as &1, &2, &3, etc. Otherwise, you'll be prompted for the values at runtime.