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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SQL Server sql to Oracle sql

  • 18-11-2008 3: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 Posts: 2,013 ✭✭✭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,212 ✭✭✭✭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