CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    170

    Question Help with sql set?

    I want to change dealerid to 3 for every dealer with a contract id = 3. I'm getting an error near '=' ? I don't know what's wrong? Thanks for help!

    select * from contract where contractid = 15 set dealerid = 3

  2. #2
    Join Date
    Dec 2007
    Posts
    234

    Re: Help with sql set?

    your SQL clauses are out of order.. it should read

    UPDATE contract
    set dealerid = 3
    where contractid = 15


    -tg

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured