Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to create a conditional flag/statement in a QV script on a QVD that needs some streamlining
The data is pulled in via ODBC and contains mainly SQL and Excel connections.
I am trying to write a statement using fields from multiple locations to create a flag to make analysis a lot easier.
So far I am at
if(ValueID='*24*' and IncidentType='*Accident*')and ([ListTitle]='*Employee*',0,1,) as 7DayFlag
I know this is probably wrong but can anyone point me in the right direction as to how to make this a flag
Thank you in advance
Thanks Harshal for the reply
My noob status however means I am not sure what you mean and where to put in the syntax/script you mentioned.
As before this file is something I have taken over and aside from some excel based reports my script knowledge is low
You have to perform above in script level only...
Thanks Harshal, but as mentioned above where in the script does this go?
Hi,
PFA,
Thanks Harshall
Unfortunately this does not work and I get an error saying "Field ValueID not Found"
PFA,
load script & see whether flag is created or not..
Thanks Harshall
Flag was created but not without ODBC and other drop table errors (about 10)
Hi,
Looking at sample file, these fields are coming from different tables. I'll suggest just have extra flag in each tables and flagging wherever the fields are coming from. i.e.
=If(ValueID = '*24*',0,1) as 7DayFlag //This will be in the table that have ValueID
=IF(IncidentType = '*Accident*',0,1) as 7DayFlag //This will be in the table that have IncidentType
=IF([ListTitle] = ''*Employee*'),0,1) as 7DayFlag //This will be in the table that have ListTitle
The other idea is to bring these fields together into 1 table (concatenate), meaning having 3 table for each field and concatenating then loading this single table as Mapping load.
Anyway try the above ideal and let us know what the result is.
Thanks Gabriel
Would this then create 3 different flags? as I want one flag to mark all 3 criteria so it is easier to use in graphs etc
Toby
It also causes issues with Master Calendar script which looks to the General Data table