Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007

    Post Unanswered: INSERT ... ON EXISTING UPDATE with ASE


    I work with ASE and I need to make insert with possibility of updating if the rows is also recorded without doing a if exists ... insert ... else ... update
    I'd like to use the instruction INSERT ... ON EXISTING UPDATE but when I launch my proc I've got the following message : ' Syntax incorrect near key word 'ON'. '

    If anyone has a solution


  2. #2
    Join Date
    May 2005
    South Africa
    Provided Answers: 1
    Don't know where you got that syntax
    Maybe construct something like this:
    update mytable set column='newvalue' where key='keyvalue'
    if @@rowcount = 0
    insert into mytable values('keyvalue','newvalue')

Posting Permissions

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