Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I'm a beginner in QV but I know some SQL.
In my companys QV-file we read in all datas from our system.
But when I will extrakt the datas I would like as similar result as if I had used "SELECT * FROM DB WHERE data_field NOT 'value1'".
What I got right now is "sum(Utfall_Belopp)" and I have a lot of info in my QV that I have to un-select.
Anyone that please can help me with a nice script.
//
You need to have a look at SET ANALYSIS. Your SUM expression would be something like
SUM({$<[the field you want to exclude on] -={'value1','value2',etc}>} Utfall_Belopp)
There is EXISTS instruction, take a look to the Help ...
Hope it helps
You can run the same SQL command in qv, like:
SQL SELECT * FROM DB WHERE data_field NOT 'value1 ;
you can use Match and wildMatch functions to filter out those records as per your requirement.
For example:
Load Name, ID, Addr, Region from Table where not match(Region,'NAMR','LAMR') ;
Are you talking about excluding in the load script of your QVW (i.e. reading from a QVD) or excluding from your SUM expression?
OK, will check that up. Thanks
Exclude from the SUM-expression
You need to have a look at SET ANALYSIS. Your SUM expression would be something like
SUM({$<[the field you want to exclude on] -={'value1','value2',etc}>} Utfall_Belopp)
Then try like:
sum({<data_field - ={'Value1'}>}Utfall_Belopp)
OK, thanks all!
I will try your suggestions on exclude from the SUM-expression.
I didn't realy understood the guide in "QV11 for developers", QV is too new for me to have a free mind and a see how the script can be "manipulated". 😃