Hi,
I'm trying to input multiple values from the jmp file into SQL variable. Something doesn't seem to work
User will input the following file and the columns values are stored in the variable specVal .
I declared @ SPEC = ^specVal^ (Contains 3 values ) in SQL
Something doesn't seem to be correct.
Names Default To Here( 1 );
Clear Globals();
Clear Log();
specVal = "";
NW = New Window( "DLT Data",
<<Modal(),
<<Return Result,
Text Box( "" ),
Spacer Box( Size( 20, 10 ) ),
Lineup Box( N Col( 3 ), Text Box( "Lot id" ), Spacer Box( Size( 20, 20 ) ), lotnum = Text Edit Box( "F141", <<set width( 100 ) ) ),
Panel Box( , Button Box( "Select file", dt = Open() ) ),
Spacer Box( Size( 20, 20 ) ),
H List Box(
Text Box( "Start data" ),
Start_date = Text Edit Box( "1/1/2022", <<set width( 60 ) )
),
Lineup Box( N Col( 2 ), Text Box( "End data" ), End_date = Text Edit Box( "", <<set width( 60 ) ) ),
Panel Box( ,
H List Box(
Button Box( "OK",
specVal = :Column 1 << Get Values;
specVal1 = Start_date << get text();
specVal2 = End_date << get text();
),
Button Box( "Cancel" )
)
)
,
<<Size Window( 250, 300 )
//Button Box( "OK", specVal = specCB << get text())
);
If( specVal != "",
(ODBC = Create Database Connection( "DSN=xxx;;UID=xxx;PWD=;APP=JMP;WSID=xxx;DATABASE=xxx;" ) ;
SQL =
Eval Insert(
"
DECLARE @SPEC1 VARCHAR (50)
SET @SPEC1 = '^specVal^'
SELECT t1.[vcLotCode]
FROM [dbo].[vSMTDatat] t1
WHERE ( ( ( ( t1.[vcLotCode] IN ( @SPEC1 ) ) ) ) ;" // Input from the user
) ;
DT = Execute SQL( ODBC, SQL, "DLT Data" ) << Maximize window ;
Close Database Connection( ODBC ) ;
)
);
Thanks