× 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 have to be honest, when I saw it I thought regex!!!

I think a bespoke RPG program might be best tho.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: 23 March 2009 19:55
To: Midrange Systems Technical Discussion
Subject: Re: Selecting data between markers via SQL.

I reread it. I think it's going to be awfully tricky in SQL.
INSERT INTO QTEMP/MIKE VALUES('go &field& go')
INSERT INTO QTEMP/MIKE VALUES('go &a&, go &b&')


with t1 as(
select testchar,
locate('&',testchar) as start,
locate('&',testchar,locate('&',testchar)+1) as end
from qtemp/mike
where posstr(testchar,'&')<>0)
select testchar,
substr(testchar,start+1,end-start-1) as field
from t1

....+....1....+....2....+....3..
TESTCHAR FIELD
t&st +++++++++++++++
go &field& go field
go &a&, go &b& a
******** End of data ********

and if you're not using a variable length text field but instead are
subfiling a bunch of 'line' rows you could have trouble with variables
that span rows like:
Listen &CNNAME&. You're a freaking deadbeat and you owe us %do
llars%. If you don't pay up by &DateDue& then big Louie is per
sonally going to rip off your %anatomy%.

Rob Berendt

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.