• Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL merge  RSS feed

 
sinatra roger
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have followed the DB2 documentation for MERGE and have come up with the below statement.

      

But this is failing with the below error:

Keyword SOURCE not expected. Valid tokens: FULL LEFT CROSS INNER RIG

I am not understanding whats wrong here. Can someone please help?
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see from the documentation that "SOURCE" is a keyword in DB2. That would mean that you can't use it as an alias. Could you change it to something else which isn't a DB2 keyword?
 
sinatra roger
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works like a Gem! Thanks Paul. Why the hell would IBM give such kind of an example in their documentation???
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that's an example from their documentation, then I'd agree with you, it's pretty careless.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!