Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help with new starter question
Hello,
Can some advise me how I can move forward with this problem?
I have a large table, with a certain field containing a string. I need to check the string for certain key words, and if I find them, insert a value into a different field in the same table.
For example, before would be:
FieldA North South East WestEast, North, West
afterwards the same table would look like:
FieldA North South East West East, North, West Y Y Y South, West Y Y
Hope thats clear - simple really.
I have tried the instr check and this works fine. The only problem is that the string in FieldA can contain up to 20 required strings (poor database design, I know), and the table contains about a million rows.
(Finally) my question is this - please can someone advise me the quickest way to go about this? As I said, I am fairly new to Oracle, and don't know which path I should take? Would some PL/SQL code be quicker than 20 instr checks and insert statements?
Please someone point me in the right direction.....
Thanks,
RP
Received on Wed May 31 2006 - 04:37:16 CDT