I have a query that joins 2 tables (on db2/400):SET @SQLSTRING = 'SELECT * FROM OPENQUERY( AS400SRV_MSDASQL, ''select shkcoo, shdoco, shdcto, shmcu, shan8, shshan, shpa8, shvr01, shptc, shtxa1, shexr1, shaft, wajobnfrom VGISOEDTA.F42019 as f1inner join VGIWRQLIB.WRQASI as f2 on f2.wajob = f1.shvr01order by shkcoo, shdoco '')'
I join on job number from table f1 to table f2. Table f2 could have multiple records for same job number. I only need to join on first record found to get the job name. How can I do that?