Hi. Hopefully a simple one but beyond my self-taught abilities in iSeries SQL. I have a file with one field containing customer order details including their purchase order reference such as 'A1-123'. The first part of the PO reference is a branch identifier. Unfortunately, as it is a free text field, it is sometimes expressed as '123-A1' instead. I have another file containing branch details where 'A1' = London etc. So I need to look in my first file and find any orders where part of the order reference string matches the branch code in the branch details file. I realise it will be an inefficient means of testing as I will also get erroneous matches but I can also check for the customer account number in the first file which should narrow it down. I *think* the statement should be something like SELECT * FROM FILE1 WHERE CUSTORD LIKE (SELECT * FROM FILE2) but clearly this is an oversimplification. Any ideas? Thanks, Keith
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!