Toad World® Forums

Assign a parameter file per SQL


Hi to my knowledge if I want to specify dummy values for parameters in a SQL, I need to go to each parameter in a SQL, and specify with BFFileArray function. In other words, if the SQL has 20 variables I have to do it 20 times. Now as I have so many SQL to test and each SQL has so many input parameters (ie. >20), are there any quick ways to speed up such assignment process e.g. prepare a comma delimited paramter file which contains all values of all parameters in a SQL and assign this file to SQL only once (instead of 20 times for each variable?) Many thanks.


You can currently assign a single parameter file per SQL, but each bind parameter will still need to be changed. So for example you can use the file “bindvaluesforSQL1.txt” with the following values;


Then you can set your bind parameter values to;

Param # Value
1 $BFFileArray(“c:\bindvaluesforSQL1.txt”, SEQUENTIAL,1)
// Move row pointer in the file to next row and retrieve col 1 data
2 $BFFileArray(“c:\bindvaluesforSQL1.txt”, CURRENT,2)
// Stays on the current row of the file but retrieves column 2 data
3 $BFFileArray(“c:\bindvaluesforSQL1.txt”, CURRENT,3)
// Now get column 3 data