Toad World® Forums

BF Script Problems


#1

My ProgramIds.txt notepad file is as follows:-

187920,
187921,
187927,
187929,
187933,
187941,
187943,
187945,
187952,
187955,
378559

All I want to do is for my bind variable a: in (select * from program where program_id = a:) to be replaced with the values in the ProgramIds.txt file.

I get the following error

Error - Unable to execute statement in ExecuteSQL(). ORA-00933: SQL command not properly ended

Any help would be greatly appreciated.

$BFFileArray(“F:\BenchMarkTest\ProgramIds.txt”,SEQUENTIAL,1)

Hello, very new to BF.
All I am trying to do is create a script that does the following:-

select * from program where program_id = a:


#2

You have to replace your bind with the BFScript call

try this

select * from program where program_id = $BFFileArray(“F:\BenchMarkTest\ProgramIds.txt”,SEQUENTIAL,1)


#3

HillbillyToad wrote:

You have to replace your bind with the BFScript call

try this

select * from program where program_id = $BFFileArray(“F:BenchMarkTestProgramIds.txt”,SEQUENTIAL,1)

Hi Hillbilly, thanks for this, I think it now works. When I execute the sql one record is returned, I was hoping that all my records would be rturned but I guess this is just a test sql and I have chosen sequential so one record will only ever be returned. I have played around with the setting for $BFFileArray and have tried random which does select random records so at leat I know my text file of programme id’s is correct.

One further question, when I submit my job to be processed is there anyway of seeing all the sql being generated, for comfort I would like to see my select running with all the bind values being processed.

Thanks again for your help