I'm not sure if I understood but your COMPUTED table will have only 1 record?
[cod_grouppo], [polizza_short], [constante]
222, 609 def
Is this what you want to accomplish? If this is the case do:
LOAD * FROM MAINtable;
[cod_gruppo], [polizza_short], 'def' as constant
where [cod_gruppo] = '222' and [polizza_short]='609';
Here you will have the 2 tables. then you can left join them
Hi, thanks for your reply.
Sorry, my mistake. The COMPUTED table will have many records (many [contracts] related to [clients]) that have to be grouped, but only where the fields [cod_gruppo] and [polizza_short] satisfy the conditions.
For all the records resulting from this "filtering" I want to add the computed item.
Having the COMPUTED table, I then want to join it with the MAIN table so that i can "mark" the all the [clients] in the main table where they appear in the COMPUTED table. Forget about the [contract] field in the join.
Would be easy in MSaccess....
What would the code be in order to make a left join between the 2 tables that are now resident in QV?
Not sure I got it all figured out:
load * from [MAIN];
load [clients], [cod_gruppo], [polizza_short], 'constant' as constant where [polizza_short]='609' and [cod_gruppo] = '222';
left join [MAIN]
load * resident COMPUTED;
drop table COMPUTED;
The result of this should be that I have only a MAIN table with a [computed] field that identifies all the records where [polizza_short]='609' and [cod_gruppo] = '222'.