Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Oracle (http://www.go4expert.com/forums/oracle-forum/)
-   -   problem with UPDATE (http://www.go4expert.com/forums/problem-with-update-t17610/)

cerebrum 19May2009 21:36

problem with UPDATE
 
I have a column "credit/debit" in a table named "bank"
the data type for this column is VARCHAR2(25)

I tried to update the row by altering the value of the column "credit/debit"

my query was :

UPDATE BANK
SET CREDIT/DEBIT = 'YES'
WHERE FIRST_NAME = 'LUKE'

but i get the error

ORA-00927: missing equal sign

wat to do ?

thanx

xpi0t0s 20May2009 04:40

Re: problem with UPDATE
 
You need to enclose CREDIT/DEBIT in quotes otherwise Oracle will think this is an expression, i.e. CREDIT divided by DEBIT, and this is wrong syntax because CREDIT should be followed by an equals not a divide, hence the error.

cerebrum 20May2009 08:09

Re: problem with UPDATE
 
I had been trying to enclose it in single quotes only but as soon as i enclosed it in double quotes the command completed sucessfully.

thanx buddy


All times are GMT +5.5. The time now is 11:57.