Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help with new starter question

Help with new starter question

From: <oohrogerpalmer_at_gmail.com>
Date: 31 May 2006 02:37:16 -0700
Message-ID: <1149068170.020492.17090@i39g2000cwa.googlegroups.com>


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        West
East, North, West
South, 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US