× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Given the following SELECT statement, I get three rows returned, with values for EMAIL."USER" and EMAIL.EMAIL:

SELECT
CUSTMAST.D1010 AS CUSTOMER_NUMBER ,
CUSTMAST.D1015 AS COMPANY_NAME ,
EMAIL."USER",
EMAIL.EMAIL

FROM CUSTMAST

LEFT JOIN
(
SELECT CUSTNO, "USER", EMAIL
FROM DLREMAIL
-- LIMIT 1
) AS EMAIL ON CUSTMAST.D1010 = EMAIL.CUSTNO

WHERE CUSTMAST.D1010 = 782805

If I uncomment the LIMIT clause in the subselect, so that LIMIT 1 is in effect, I get 1 row returned, but the EMAIL."USER" and EMAIL.EMAIL values in the result set are NULL. I expected that the values would contain data from the first row selected in the subquery.
Any insight as to what I need to do to get just 1 row of data from DLREMAIL, with the values? There are 3 rows in the DLREMAIL table for customer number 782805, and there are values (non-null) for the columns in those rows.

(table/column names are in a legacy table).

Thanks,
Craig Pelkie

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.