Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community
I'm sort of new in development.
The thing is should I insert some calculation function in all field except grouping field? Like max(field1), maxstring(field2), max(field3) from .... group by field4, field5.
Is there any other better solution of group data?
Regard Muncho
Hi Muncho,
you could try a distinct load...
Hello Gregor,
Distinct load doesn't fit my case.
But thanks
Hi, Muncho
Not sure if I understood your question...
You can make as you thought:
load max(field1), maxstring(field2), max(field3), field4, field5
from .... group by field4, field5;
As you would do on a sql database...
You you give us more details or a sample we can provide a more detailed answer.
Hope it helps,
Erich
Let's say i have below fields
userID, last_name, first_name, age, gender, address1, address2, address3, phone, country, postal_code...
Ok, now i need to group them by userID using group by clause. So i need to use max() or count() in every field right?
I just want to know is there better way to do this.
BTW sorry for my bad English.
Yes, i know i need to tell QV which field to use in grouping.
But i know there is better way which i don't know.
Please open my eyes little bit
You have to do it if you want to group data but maybe you can create different rules, for example, keep only the last record for one userID, only the first, etc
In those cases, I would create a table with flags depending on the condition, apply those flags back in the main table using left join and then use resident load to keep only the values that matched the flag.
I'm not sure if you can apply it on your model.
Thanks Gregor and Erich.
I got something on your posts.