I am working with a collegue that has a JMP 13 script to is defining variables using Modal windows. User selection then sets variables that we want to pass into a open database section of our script in the SQL statement. Data table is updated for which oven is selected in the Modal window. We then select the oven column to pass this value into our SQL statement.
Example.
OvenList={18,22};
nw=New Window( " Reference Units",<<Modal,
Text Box(" Define the Oven you want"),
Text Box( ""),
Panel Box("Select",
oven_bx = Radio Box( {"Oven 18", "Oven 22"})),
Text Box(""),
V List Box(ok_btn=Button Box("OK",
ov1=oven_bx << Get;),
cncl_btn=Button Box ("Cancel")));
New Column("Oven",numeric, nominal);
:Oven<< Set Each Value(OvenList[ov1]);
oven_id= :Oven << Get Values;
test_part_id = :ExpNo << Get Values;
Open Database( -- connection string info -- ,
"
Select
db.table.field1
db.table.field2
db.table.field3
FROM db.table
WHERE
db.table.exprmt = 'blah'
AND db.table.field = " || oven_id || "
AND db.table.field In(" || test_part_id || ")
ORDER BY test_part_id ASC
", "dataset");
Issue we have is the following...
oven_id: script passes [2,2]
test_part_id: script passes {"partid1","partid2"}
Questions
1) how do we select the first value in the oven column to set as the oven_id that gets passed to SQL statement?
2) Oracle appears to not like the parenthese and double quotes. It works if we hard code single quotes and part ids ex: IN('partid1','partid2')
HELP!!!