Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL Server sql to Oracle sql

Options
  • 18-11-2008 4:39pm
    #1
    Registered Users Posts: 169 ✭✭


    Hi,

    Can someone translate this into an ORACLE compliant sql statement.



    update TABLE3
    set code = ltrim(rtrim((select Col003
    from TABLE2
    where ID = a.ID and Col002 = 1)))
    from TABLE3 a




    I cant for the life of me produce the results the sql svr guy is getting.
    cheers
    db


Comments

  • Registered Users Posts: 1,996 ✭✭✭lynchie


    Is the equivalent of ltrim(rtim()) not the same as the trim() function in oracle?

    i.e.

    update TABLE3
    set code = ( select trim(Col003)
    from TABLE2
    where ID = a.ID and Col002 = 1)
    from TABLE3 a

    my oracle is very rusty!!


  • Registered Users Posts: 23,212 ✭✭✭✭Tom Dunne


    I would say drop the 'from TABLE3 a' bit.

    Handy link: Oracle SQL reference.


  • Registered Users Posts: 169 ✭✭DonnieBrasco


    cheers.
    my source data in both systems was not matching which didnt help!


Advertisement