0

I'm running SQL code within Oracle and need help revising the below "Update" script. The below script gives me the error “missing equal sign” due to the " ^ " in the last line of the code that is meant to take the Table-B.ValueY value to the Table-A.ValueZ power. I tried changing the last line to a Power (x,y) formula, but that gives me "%s: invalid identifier" error. I also went so far as to change the code completely into a CREATE TABLE, but that just appears be caught in a loop and never finishes.

Any help is much appreciated.

Original code:

UPDATE Table-A 
SET Column-X = 0 
WHERE 
  TABLE-A.mid = TABLE-B.mid AND 
  TABLE-A.tdlinx = TABLE-B.tdlinx AND 
  TABLE-B.ValueY ^ TABLE-A.ValueZ > 0.1;
Ed Gibbs
  • 25,924
  • 4
  • 46
  • 69
  • 1
    The answer from @Randy is correct. You're getting the "missing equal sign" because one (very obscure) way to specify "not equal" in Oracle is `^=`, as in `WHERE value ^= 3`. – Ed Gibbs Jul 02 '13 at 14:34

1 Answers1

1

there is a POWER function

SELECT POWER(10,2) FROM DUAL;

yours should look similar to this:

POWER( TABLE-B.ValueY, TABLE-A.ValueZ ) > 0.1
Randy
  • 16,480
  • 1
  • 37
  • 55
  • Thanks for the feedback, but unfortunately I already tried the POWER function you outlined and receive the "%s: invalid identifier" error message associated with that line of the code. – Rob Montgomery Jul 02 '13 at 14:55
  • do you reference table B anywhere in the real statement other than in the where clause? – Randy Jul 02 '13 at 15:26
  • i suggest replacing the POWER with a static number like 1, then you can concentrate on the rest of the syntax. when that works, replace the power part. – Randy Jul 02 '13 at 15:27
  • No, I don't reference table B elsewhere in my script aside from the WHERE Clause. I was able to get a Create Table to work with a revised POWER(X,Y) statement where I used the hard-keyed 3 as the exponent instead of a variable. Just need to get it to work with the variable in question. Just a pain to take 3 steps vs. 1 since the UPDATE script won't work. – Rob Montgomery Jul 02 '13 at 15:57