Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    7

    Unanswered: converting from Ora to SQL server

    I'm new to SQL server.
    I've been working with oracle and now need to convert this sentence to SQL Server but I get this error:

    Server: Msg 170, Level 15, State 1, Line 1
    Line 1: Incorrect syntax near 'A'.
    Server: Msg 156, Level 15, State 1, Line 6
    Incorrect syntax near the keyword 'where'.m_proceso;

    My sentence is:
    /*****************
    update data_grup A
    set
    new_grup_code =( select cod_grup_2
    from data_grup_new B
    where A.cod_grup = B.cod_grup )
    where zone = '001' ;
    /*****************
    Can anyone help me to convert this to SQL server, I don't know why I get this error.
    Thanks.

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    Try using this:

    update data_grup set A.new_grup_code= B.cod_grup_2
    from data_grup A , data_grup_new B
    where A.cod_grup=B.cod_grup
    and zone ='001'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •