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

Home -> Community -> Usenet -> c.d.o.server -> Re: Bending the rules using MERGE INTO

Re: Bending the rules using MERGE INTO

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 17 Jul 2003 04:47:42 -0700
Message-ID: <1a75df45.0307170347.73a509f1@posting.google.com>


omar_adebisi_at_hotmail.com (Simon Adebisi) wrote i

> Based on the scenario you mentioned I have
> knocked out some of the coding for you:
>
> insert into test (a, b) values (1, 1);
> update test set b = 2;

The way I read it, the update should look as follows:

UPDATE test
  SET b = 2
WHERE a = b

I.e. if there is a match, "mark" the 2nd column.

Not that this type of thing makes a lot of sense just looking at the SQL.. old and continual gripe I have. People posting for help when they do not identify the actual problem.

The so-called solution that a poster wants help on, is often the darn wrong one in the first place for his problem. If the problem is identified and the the proposed solution offered.. then we are in a much better position to provide truly meaningful advice.. as oppose to respond with fixes to syntax errors and the like to what the OP thinks the solution should be.

--
Billy
Received on Thu Jul 17 2003 - 06:47:42 CDT

Original text of this message

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