Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

SQL Server sql to Oracle sql

  • 18-11-2008 04:39PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2, Paid Member Posts: 2,033 ✭✭✭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, Registered Users 2 Posts: 23,202 ✭✭✭✭Tom Dunne


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

    Handy link: Oracle SQL reference.


  • Registered Users, Registered Users 2 Posts: 169 ✭✭DonnieBrasco


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


Advertisement
Advertisement