dcsimg
Results 1 to 2 of 2

Thread: Query syntax error - help

  1. #1
    Join Date
    Apr 2005
    Location
    Indiana, USA
    Posts
    1

    Query syntax error - help

    Hi,

    I am using SQL query analyzer and typed the following,

    Update xupaddress as A1, xupaddress as B1
    SET A1.address1 = upper(B1.address1)
    set A1.address2 = upper(B1.address2)
    set A1.city = upper(B1.city)
    set A1.state = upper(B1.state)
    where A1.ProfileID = B1.ProfileID

    I am getting followin error :
    Server: Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'as'.

    Please point out what is wrong
    Thank you

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Update A1
    SET A1.address1 = upper(B1.address1) ,
    A1.address2 = upper(B1.address2),
    A1.city = upper(B1.city),
    A1.state = upper(B1.state)
    from xupaddress A1, xupaddress as B1
    where A1.ProfileID = B1.ProfileID

Posting Permissions

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