Focal Point
[SOLVED] How to compare two string columns?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4137078216

November 14, 2011, 04:21 PM
nsk110483
[SOLVED] How to compare two string columns?
Hi All,

I am searching for a way to compare two fields where colA and colB are Varchar datatypes.
colA has a string which can be a part of colB.
I need to find all the rows where colA is a part of colB.

I am trying with LOCATE function in DB2, so I could do a sql passthru, but not successful.

Thanks for any help

This message has been edited. Last edited by: nsk110483,


In Focus since 2008
WebFOCUS 8.2.0.1
Windows 7 - IE,Chrome,Firefox
Excel, PDF, HTML, AHTML, XML
JavaScript, jQuery, D3.js, Highcharts
November 14, 2011, 04:31 PM
Waz
WHERE colB CONTAINS colA ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 21, 2011, 03:20 PM
nsk110483
Thanks Waz,

but LOCATE did work with some small tweaks.
Thanks anyways


In Focus since 2008
WebFOCUS 8.2.0.1
Windows 7 - IE,Chrome,Firefox
Excel, PDF, HTML, AHTML, XML
JavaScript, jQuery, D3.js, Highcharts