×
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.
Robert Munday wrote:
Have you ever had one of those days? That which worked swell in the past no longer does. It must be advancing age.
I'm creating a PREPARE statement in my RPG program for an embedded SQL statement. I have a quotation mark field defined as:
D @Q S 4A Inz('''') Quotation Marks
I think that having @Q defined as 4A is probably not what you want, and
may be causing some of the strange values you are seeing in debug. If
History_Code_Manual contains "123" and is defined as 3A, and you have
the statement:
QQW = 'Where (BHBHST = ' + @Q + History_Code_Manual + @Q
Assuming QQW is defined as long enough to hold the whole statment, the
value of QQW will be "Where (BHBHST = ' 123' ". I think what you
want is "Where (BHBHST = '123'".
The best solution, in my opinion, would be to create a quote() procedure
that returns a Varying Character type containing the quoted value.
Otherwise, @Q should probably be defined as a constant:
D @Q C ''''
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.