Haven't understood your question completely but if the two tables are
having distinct (non-duplicate) records, then you may want to change
the UNION to UNION ALL to avoid an unnecessary sort.
Best regards,
ram
Karlitos wrote:
Quote:
Here is my case :
>
CREATE view v1 AS
(SELECT 'E' as language,
Field1,
Field2 from libE/table1
union
SELECT 'F' as language,
Field1,
Field2 from libF/table2)
>
Where Field1 is the PK.
And the tables have 10 000 rows.
>
Then two identical files in two librairies. One per language, french
and english. We want to access these files in Cobol. We added a new
field for the language to be able to do a quick start in cobol if it
is possible. I tried to do a DBU on it and DBU doesn't see any row.
In SQL it works perfectly and it seems to be really quick. The PK
indexes have been selected.
>
Then my question is: is it possible to access my view with a start in
a Cobol, on the fields "language" and "Field1".
>
If it is not possible with this solution, how can I could do that ?
>
Note, I know that I could use and embeded SQL in my Cobol, but I'm
screared of the poor performance.
>
Thanks a lot.