Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i want to run a script before the load script.
set vartest = "Hello";
set newTest = "";
if($(vartest) like 'Hello',
// Then
$(newTest) = $(vartest) & ' World!',
// else
$(newTest) = $(vartest) & ' how are you?'
);
tbl_name:
LOAD * Inline
[fieldname,
a
b
c
$(newTest) as newTest
];
The script editor shows error´s in the if statement. What´s wrong?
Regards,
sam
May be this:
set vartest = "Hello";
set newTest = "";
if $(vartest) = 'Hello' THEN
$(newTest) = $(vartest) & ' World!',
ELSE
$(newTest) = $(vartest) & ' how are you?'
END IF;
tbl_name:
LOAD fieldname,
$(newTest) as NewTest;
LOAD * Inline
[fieldname,
a
b
c
];
I think it should be more look like this:
set vartest = Hello;
set newTest = "";
if '$(vartest)' = 'Hello' THEN
let newTest = '$(vartest)' & ' World!',
ELSE
let newTest = '$(vartest)' & ' how are you?'
END IF;
tbl_name:
LOAD fieldname,
'$(newTest)' as NewTest;
LOAD * Inline
[fieldname,
a
b
c
];
- Marcus
Hello Walter,
Hope you are doing well!
Please modify your script as below:
set vartest = "Hello";
LET newTest = if(vartest like "Hello", vartest & ' World!', vartest & ' how are you?');
TRACE $(newTest);
Thank you!
Rahul