on 07-07-2020 1:41 AM
In script , i want to check value '1' in a global variable ($GV_VAR) and the value of $GV_VAR is 1,2,3
if ('1' in ($GV_VAR))
PRINT('PASS');
ELSE
PRINT('FAIL');
There is no syntax error but i am not getting 'pass' as result, where am i going wrong ? is there any alternate method ?
Hello Saurav
Try this
Declare $GV_VAR as VARCHAR 10
$GV_VAR = '1,2,3';
if(index($GV_VAR,'1',1)>0)
print('PASS')
else
print('FAIL');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
11 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.