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



SQL != DDS.

Always use an ORDER BY clause on select statements if you intend to
review the result in a particular order. SQL does not guarantee record
order otherwise. What you saw was due to how the query optimizer chose
to access records, based on the different join and where conditions.

Loyd Goodbar
Business Systems
BorgWarner Shared Services
662-473-5713

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
franz400@xxxxxxxxxxxx
Sent: Wednesday, May 28, 2008 10:50 AM
To: Midrange Systems Technical Discussion
Subject: RE: strsql not showing all records

I tried both your version of the join and mine - my mistake was with no
order by clause, I was assuming the file would display in session# order
which is not the case. Adding the and CCSESS.SSCCAN ='AV' changes the
order of records returned (drastically). Both ways work and return the
same set, but not in same order. My mistake for assuming something.
Added an Order by clause and now makes sense.
Thx
Jim Franz



---- Elvis Budimlic <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I have never seen STRSQL not show records due to non-displayable
characters.
In the older emulator versions, non-displayable characters could break
your
display session.

You can test your theory by outputting to a file instead (F13 --> set
'SELECT output' to 3).

I suspect your issue lies with where you place your selection criteria
(JOIN
clause versus WHERE clause). I suggest moving the selection into the
JOIN
clause and seeing if you get the result set you're interested in,
i.e.:

SELECT CCSESS.SSCCST, CCSESS.SSCCXE,CCSESD.SDCCSS, CCSESS.SSCYMD,
CCSESD.SDCCMJ, CCSESD.SDCCMI, CCSESD.SDCCPS, CCSESS.SSCCAS as AS,
CCSESS.SSCONO, CCSESS.SSDIV,CCSESS.SSLC, CCSESS.SSCLIN,
CCSESD.SDCCSR as SR, CCSESD.SDCCSQ, CCSESD.SDHMS, CCSESS.SSCCAN,
CCSESD.SDCCPK FROM ccsesd join ccsess on sdccss=ssccss AND SsCCSS
1119978 and CCSESS.SSCCAN ='AV'

HTH, Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: strsql not showing all records

Have a join of a large tran file with a master file, joined by a
session
nbr.
Many tran records with a single master record.
Depending upon where I position the file (Where ..) I don't see all
the
records.
If I remove the 'and ccsess.ssccan='AV' I see them (many with 'AV').
But with that "and" selection the file stops showing trans after 2
days ago.

If I change the starting session# in the where clause I can see more
recent
records.
btw-there is non-displayable data in the file (this is comm session
detail)
in one field that is not part of the where clause, and
the msg on the screen says there is some non-displayed.
No err in joblog. V5R4 and sf99504 DB2 Group 14.
SELECT CCSESS.SSCCST, CCSESS.SSCCXE,CCSESD.SDCCSS, CCSESS.SSCYMD,
CCSESD.SDCCMJ, CCSESD.SDCCMI, CCSESD.SDCCPS, CCSESS.SSCCAS as AS,
CCSESS.SSCONO, CCSESS.SSDIV,CCSESS.SSLC, CCSESS.SSCLIN,
CCSESD.SDCCSR as SR, CCSESD.SDCCSQ, CCSESD.SDHMS, CCSESS.SSCCAN,
CCSESD.SDCCPK FROM ccsesd join ccsess on sdccss=ssccss WHERE SsCCSS
1119978 and CCSESS.SSCCAN ='AV'
It's my 'guess' the strsql screen affected by the non-displayable
data, no
error, but also not showing all records.
Any ideas?
Jim Franz


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.