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



I am writing Stored Procedures in the SQL language. Would prefer to write
as external service programs but company standard is to use SQL and we have
actually found it faster.

Any way, I am building dynamic SQL strings and because our database is so
un-normal we have really long SQL statements we are building. When I
attempt to compile, I am getting SQL strings too long or complex. The only
solution I have found is

If I do the following

SET String = 'Select VariableA,
VariableB
From FileA';
(Actual string a lot longer).

This will give me an error but if I do the following no error. All the
blanks are compressed out.

'Select Variablea, ' ||
' Variableb,' ||
' From FileA';

Ugly as hell.

In RPG, I can do the following

SET String = 'Select Variablea, +
VariableB +
From FileA';

As soon as RPG see the + it stops processing until it hits the next
non-blank characters.

As far as I can tell, you cannot do something like this in SQL.

Anybody else got a solution to this problem?

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.