Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to code something like this,
IF $(vSource)='XL' THEN
RawDate:
LOAD
..
FROM ...xls
ELSE IF $(vSource)='DB' THEN
RawData:
ODBC CONNECT TO SandBox;
SQL SELECT ..
END IF
Based on a condition, I am trying load data either from XLS or DB. But this is not working. Even I tried giving the Table Name (RawData) Above the IF Loop. No luck either.
Do you have any suggestion for me? In either case, I need the Table Name to be RawData.
use an action for the button
Where does the script determine if vSource is XL or DB?
I am hard-coding it now.
SET vSource='XL';
But planning to get this value thru a Button click.
this works, you have to adapt to your requirement the let vSource......
let vSource= pick(ceil(rand()*2), 'XL', 'DB');
// or let vSource = 'DB' ......;
IF ('$(vSource)'='XL') THEN
//RawDate:
//LOAD
//..
//FROM ...xls
TRACE 'XLS';
ELSEIF ('$(vSource)'='DB') THEN
// RawData:
// ODBC CONNECT TO SandBox;
// SQL SELECT ..
TRACE 'DB';
END IF;
use an action for the button
Thank you so much, maxgro. This works.
One more thing. What object you have used to get 'vSource=DB'?
Input Box