Friends,
I have a requirement where I need to build a complicated investigation output.
My Source file has 2 fields
Source File I:
Acctno, Acctstyl
--------------------
1, john doe and MARY DOE DBA DOE Garage
2, Andrew Watkins TRUST account
3, ABC Consulting Inc Account
Source File II:
SEARCH WORD
--------------------------
TRUST
ACCOUNT
DOE
OUTPUT file:
WORD,ACCOUNT
-----------------------------
TRUST,1
ACCOUNT,2
ACCOUNT,3
DOE,1
The output is the relationship between the word and account. Right now I am using ORACLE with the like statement after loading these files into a table to achieve this result but was wondering if anybody had a better suggestion ??
Thanks
Search for a string
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could use the Index() function to check for each individual word. This would require hard coding "search file II" into your design.
You could parse the strings into separate rows with one word plus the account number per row (a pivot), and use a regular lookup.
You could parse the strings into separate rows with one word plus the account number per row (a pivot), and use a regular lookup.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.