Good Afternoon,
I am running into problems trying to pass a list of selected wafer from JSL into an SQL query. Currently i am able to bring in a single lot and do the data analysis with no problems. However, because i am only able to bring in one single lot i have to basically re-run the script when i want to look at wafers. Translating from JSL to SQL has me stumped and even more sometimes i get errors in the code and sometimes i just get a blank table. I know when i get a blank table the lots are not getting passed into the query. Any assistance would be greatly appreciated. I hope i did an OK job explaining my problems but if i haven't please ask for clarification.
// SQL Query - Insert Multiple Lots from JSL input
testdata_HAY_SS_QQ_L_Data = Expr(
"
SELECT DISTINCT
t1.testdate,
t1.wafer_id,
t1.wafer_number,
t2.rownum,
t2.colnum,
t2.subrow,
t2.subcol,
t2.die_id,
t2.part_name,
t2.testname,
t2.set_id,
t2.trmode,
t2.channel,
t3.ts,
t3.run_id,
t3.input,
t3.output_1a,
t3.output_1b,
t3.output_2a,
t3.output_2b,
t3.output_3a,
t3.output_3b,
t3.output_4a,
t3.output_4b,
FROM tst_master t1
LEFT OUTER JOIN tst_dataset_header t2
ON ( t2.run_id = t1.run_id )
LEFT OUTER JOIN tst_s_params t3
ON ( t3.header_id = t2.header_id )
WHERE (t2.testname LIKE 'test_1')
AND (t1.wafer_number IN ("||LotListSQLString||")
// AND (t1.wafer_number LIKE '"||SelectedLot||"') currently use to insert single wafer
"
);
// Pulls in List of Lots
testdata_HAY_Q_LotList = Expr(
"
SELECT DISTINCT t1.wafer_number
FROM tst_master t1
LEFT OUTER JOIN tst_dataset_header t2
ON ( t2.run_id = t1.run_id )
WHERE t1.wafer_number RLIKE '-ATL'
"
);
dt_LotList = Open Database( <DB_CONNECTION>, testdata_HAY_Q_LotList, "LotList", Invisible );
Summarize( LotList = By (:wafer_number ));
Insert Into( LotList, "<SELECT lot="">", 1);
Close (dt_lotlist, No Save);
// Choose Your Lot
doListChoice = expr(
SelectedLot = LotListBox << getSelected;
show(SelectedLot);
);
//LotListBox = ComboBox(LotList, doListChoice); // used to insert single lot
LotListBox = CheckBox(LotList, doListChoice);
win = New Window( "DataBase",
// <<MODAL></MODAL></SELECT></DB_CONNECTION>