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


  • Subject: Re: Query conversion
  • From: "Dan Bale" <dbale@xxxxxxxxxxx>
  • Date: Tue, 7 Sep 1999 12:55:38 -0400



Wayne,

Please be aware that not everything in an AS/400 query carries over into SQL,
most notably the query report layout.  I've been burned several times trying to
convert queries into SQL.  If your query is outputting to a datafile, and not
printer output, you may have better success.  Given your admission that you're
not very strong in SQL, I'd proceed very cautiously.  Also, I'm not certain that
converting *qrydfn to SQL will convert joins optimally; I seem to remember being
burned on converting these types of queries as well.  From the "DB2 for AS/400
Query Management Programming (Version 4) (Document Number SC41-5703-00)"

---- Begin ----
Chapter 12.  Using Query/400 Definition Information

.. clip ...
Some of the functions that can be specified and saved in a QRYDFN object cannot
be transformed into query-management-supported SAA functions, and some cannot be
precisely transformed.
.. clip ...
Different, and possibly unacceptable, output can be produced from derived
information even when there are no transformation problems.  Query management
may provide different defaults for functions that cannot be specified, or use
successfully transformed choices differently.

----  End  ----

How do you figure to save time by converting?

Sorry to be such an alarmist, but, been there, done that.

- Dan Bale

>I have a bunch of AS/400 queries that I would like to change into SQL.
>Is there a way of taking a saved query definition and translating it
>into SQL?  Many of these queries have multiple joins so the translation
>would save a lot of time trying to figure it out.  SQL syntax is not my
>strong suite.
>Thanks
>Wayne





+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.