problem with UPDATE

Discussion in 'Oracle' started by cerebrum, May 19, 2009.

  1. cerebrum

    cerebrum New Member

    Joined:
    Dec 15, 2008
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    0
    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
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     
    shabbir likes this.
  3. cerebrum

    cerebrum New Member

    Joined:
    Dec 15, 2008
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    0
    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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice