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



Would that be an African or European...? Err.... ASCII or EBCDIC? That is a question of both the column and the client; it may make a difference.

Possibly just: WHERE LOCATE(x'0D25', text_column) > 0

<code>
-- All of below done from an EBCDIC client; i.e. on
-- the i5 server, from emulated workstation session
create table qtemp/text (txt varchar(80) ccsid 37)
;
insert into qtemp/text values
('Greetings Earthlings!'),(''),('We come in peace.')
,(''),('This line too.'),(''),('But not this one.')
,(''),('Regards, Aliens')
-- 9 rows inserted in TEXT in QTEMP.
;
update qtemp/text set txt = replace(txt, 'in', x'0D25')
where locate('in', txt)>0
-- 3 rows updated in TEXT in QTEMP.
;
select rrn(T) from qtemp/text T
where locate(x'0D25', txt)>0
-- RRNs 1, 3, 5 selected
;
create table qtemp/textu (txt varchar(80) ccsid 1208)
;
insert into qtemp/textu select * from qtemp/text
-- 9 rows inserted in TEXTU in QTEMP.
-- Note: CRLF are now x'0D0A' in TEXTU
;
select rrn(U) from qtemp/textu U
where locate(x'0D25', txt)>0
-- RRNs 1, 3, 5 selected
-- I am unclear what the correct search or results
-- should be here; above just shows what happens.
-- I expect the ASCII client should use x'0D0A' to
-- get the same results.
</code>

Regards, Chuck

MKirkpatrick@xxxxxxxxxxxxxxxxx wrote:
I give up. I am trying to determine if a column in my table
contains any CRLFs.
Any suggestions, using SQL.


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.