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



Yeah! trying to get this mindset over here.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Birgitta Hauser
Sent: Thursday, June 23, 2011 11:11 AM
To: 'RPG programming on the IBM i / System i'
Subject: AW: Embedded SQL error

I find it helpful to develop SQL to be embedded using System i Nav
Run SQL Scripts. My habit is to create and save a .sql file
named for the program or project. I keep these files for
use later for debugging or enhancements.

For complex SQL Statements I'd suggest to create SQL Views that can be
executed and tested in every SQL environment (and even with Query/400).
Because an SQL View has no key, you can have thousands of views on your
system without any performance decrease.
(Contrary to SQL indexes which must be updated as soon as any row in the
base table will be changed).

In this way my (embedded) SQL Source code is quite easy, 'SELECT Col1, Col2,
... ColN from MyView' where sometimes some WHERE conditions and/or Order By
clauses are added.
If something changes I only have to change my view and none of programs,
queries, downloads that use this view must be changed.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Gary Thompson
Gesendet: Thursday, 23. June 2011 15:21
An: RPG programming on the IBM i / System i
Betreff: Re: Fw: Embedded SQL error

Richard wrote:

Is there an easier or more intuitive way of debugging embedded SQL?

I find it helpful to develop SQL to be embedded using System i Nav
Run SQL Scripts. My habit is to create and save a .sql file
named for the program or project. I keep these files for
use later for debugging or enhancements.

Having SQL commands separate from program code simplifies coding
and allows me to focus.

Using FIND, I see six CAST and only five AS in your statement,
so I would, as Michael Schutte suggested, start with
that mis-match.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

________________________________

Notice from Bob Evans Farms, Inc: This e-mail message, including any attachments, may contain confidential information that is intended only for the person or entity to which it is addressed. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.

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.