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



Hi!

try

Select ifnull(ara, ' ') as area, acct, name
From file1 left outer join file2
On acct = f2acct
Order by ifnull(ara, ' '), acct

Regards,
Alexei

-------- Original Message --------
Subject : wrkqry vs sql result difference
From : Smith, Mike Mike_Smith@xxxxxxxxxxxxxxxx
To : Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc :
Date : Tuesday, September 22, 2020 16:03

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

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.