Mike,

you were close with your 'left outer join' attempt, but you need to
separate your 'join on' from your 'where' clauses.
try this:

SELECT UMACT, UMPRM, UMSTS, UOACT, UOARA
FROM uact left outer join
     uactov
  on umact = uoact
where Uoara = '' and
      umsts in('AC', 'PN')

Rick

--original message---
Subject: QUERY TO SQL

I have a standard query that i am trying to convert to an SQL statement but
i cannot get the same results in my SQL and query

the query  has file UACT, UACTOV

it is a  '2' (matched records with primary file) on UMACT = UOACT

in the record selection  UOARA = ' ' and UMSTS LIST 'AC , 'PN'

this query produces 5 records.


so i've tried numerous sql statements to duplicate this.

SELECT UMACT, UMPRM, UMSTS, UOACT,
UOARA FROM uact left outer join uactov on umact = uoact
and Uoara = ''

SELECT UMACT, UMPRM, UMSTS, UOACT,
UOARA FROM uact, uactov WHERE umact = uoact and umsts
in('AC', 'PN') and UOARA = ' '


and others.

i've even tried doing a ' RTVQMQRY'

i've already written the report using Native I/O(SMILE JOE)  but want to
figure out the correct SQL statement for future reference.

anybody have ideas.

thanks

mike




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.