I am facing one interesting issue while reading from a calculation view through variables ... the code is as follows:
do begin
declare lv_ww nvarchar(6);
declare lv_quarter nvarchar(6);
select "WORKWEEK","QUARTER" INTO lv_ww,lv_quarter from "ABC"....
I want to know if a substring is present in a string in a calculated column in a cal view. So, i want to try for charpos() function but i can not understand how it is working ... i know there is one more function locate() in sql engine for a calculat...
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 go...