× 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 think this will help you:

play with this in acs:

values (
regexp_replace ('a b c' , '\s+' , ' ')
)


This means: replace any whitespace (one or more including tabs and
newlines) with one blank

which in your code will be

SET SQLCMD = regexp_replace (SQLCMD , '\s+' , ' ');

On Sun, Mar 15, 2020 at 6:02 PM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>
wrote:

Maybe then a regex_replace to remove all extra white spaces? I can try to
compose one for you

lør. 14. mar. 2020 kl. 23.04 skrev Alan Campin <alan0307d@xxxxxxxxx>:

CLOB errors out too. String too long.


On Sat, Mar 14, 2020, 2:50 PM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>
wrote:

Use a CLOB

fre. 13. mar. 2020 kl. 17.04 skrev Alan Campin <alan0307d@xxxxxxxxx>:

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?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com



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.