× 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.



Just for fun, Mike, you might try the RTVQMQRY command to pull the SELECT statement that corresponds to what is in the QRYDFN - it won't take care of the NULL issue but might be a handy way to get the SELECT statement that will get the same results - other than how NULL is handled, where Query gives a blank, SQL gives the hyphen.

Also, when you use RTVQMQRY, you can get messages that say what incompatibilities there might be.

Cheers
Vern

On 9/22/2020 8:03 AM, Smith, Mike wrote:
I have a query that I'm trying to convert to sql.
The query has a join file(2) matched records with primary file
Sorted by area and account

There are a dozen or so records not in the secondary file however, when the results display I get something like this

AREA Account

' ' 1
' ' 2
' ' 3
AREA1 10
AREA1 11


When I convert this to SQL I don't' get the same results, because of the NULL values, but I can't figure out how to get the null converted to a space in the query
My results look like this

AREA Account
' ' 2
AREA1 10
AREA1 11

- 1

- 3


I have tried using select ifnull(ara, ' ') as area
And coalesce(ara, ' ') as area
But no luck

My query looks like this

Select ara, acct, name
>From file1 left outer join file2
On acct = f2acct
Order by ara, acct

Thanks

MIke



NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.