Run query from batch with query parameters

General

Run query from batch with query parameters

Hi,

i would like to run query from a batch file similir to this:

C:\Program Files\Teradata\Client\13.11\Teradata SQL Assistant\sqla.exe  -f  K:\shared\DonutData\Bakery_Distress_Production.sql -e K:\shared\DonutData\DonutDistress.txt

where the query (Bakery_Distress_Production.sql) contains query parameters like this:

select * from bakery_storage where product_id = '?inputProductID'

is it possible to handover the value for the paramter ?inputProductID in the batchfile? something like:

C:\Program Files\Teradata\Client\13.11\Teradata SQL Assistant\sqla.exe  -f  K:\shared\DonutData\Bakery_Distress_Production.sql?inputProductID=123 -e K:\shared\DonutData\DonutDistress.txt

thanks,

Loyz

Tags (2)