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



Rob,
Thanks so much. I think this is going to be a good start to accomplish
what I want.

Mike

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Monday, March 23, 2009 3:55 PM
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
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
rob@xxxxxxxxx
To:
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date:
03/23/2009 03:33 PM
Subject:
Re: Selecting data between markers via SQL.
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



CREATE TABLE QTEMP/MIKE (TESTCHAR CHAR (15 ) NOT NULL WITH DEFAULT)
Table MIKE created in QTEMP.
INSERT INTO QTEMP/MIKE VALUES('test')
1 rows inserted in MIKE in QTEMP.
INSERT INTO QTEMP/MIKE VALUES('t%st')
1 rows inserted in MIKE in QTEMP.
INSERT INTO QTEMP/MIKE VALUES('t&st')
1 rows inserted in MIKE in QTEMP.
select testchar
from qtemp/mike
where posstr(testchar,'%')<>0
or posstr(testchar,'&')<>0
....+....1....+
TESTCHAR
t%st
t&st
******** End of data ********


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.