{"action":"created","issue":{"url":"https://api.github.com/repos/ibmdb/node-ibm_db/issues/147","repository_url":"https://api.github.com/repos/ibmdb/node-ibm_db","labels_url":"https://api.github.com/repos/ibmdb/node-ibm_db/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/ibmdb/node-ibm_db/issues/147/comments","events_url":"https://api.github.com/repos/ibmdb/node-ibm_db/issues/147/events","html_url":"https://github.com/ibmdb/node-ibm_db/issues/147","id":168993162,"number":147,"title":"Parameter Binding in Upsert","user":{"login":"chadbean","id":852768,"avatar_url":"https://avatars.githubusercontent.com/u/852768?v=3","gravatar_id":"","url":"https://api.github.com/users/chadbean","html_url":"https://github.com/chadbean","followers_url":"https://api.github.com/users/chadbean/followers","following_url":"https://api.github.com/users/chadbean/following{/other_user}","gists_url":"https://api.github.com/users/chadbean/gists{/gist_id}","starred_url":"https://api.github.com/users/chadbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadbean/subscriptions","organizations_url":"https://api.github.com/users/chadbean/orgs","repos_url":"https://api.github.com/users/chadbean/repos","events_url":"https://api.github.com/users/chadbean/events{/privacy}","received_events_url":"https://api.github.com/users/chadbean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-02T21:29:08Z","updated_at":"2016-08-04T01:59:25Z","closed_at":null,"body":"Parameter binding has been working fine for all of my SELECT, UPDATE, DELETE, and INSERT statements. However, I just tried to use it with an UPSERT (MERGE INTO ...) and I'm getting some odd errors. I should say that if I change this query to use the values directly (without bind params), it works fine. This is on DB2 running on IBM i with a journaled table.\r\n\r\nHere is a similar query to what I am using:\r\n\r\n```\r\nmerge into SCHEMANAME.TABLENAME as tgt\r\n     using (\r\n        values(?, ?)\r\n       ) as src (\r\n        NAME, AGE\r\n      )\r\n      on (tgt.ID) = (src.ID)\r\n      when matched then\r\n        update set \r\n          tgt.NAME = src.NAME,\r\n          tgt.AGE = src.AGE\r\n      when not matched then\r\n         insert values(src.NAME, src.AGE)\r\n```\r\nHas this module been tested using bind parameters with `MERGE INTO`?\r\n\r\nThe exact error message I receive is:\r\n\r\n```\r\n[IBM][CLI Driver][AS] SQL0584N  The statement failed because of an invalid use of the NULL keyword or the DEFAULT keyword.  SQLSTATE=42608\\n\r\n```"},"comment":{"url":"https://api.github.com/repos/ibmdb/node-ibm_db/issues/comments/237431096","html_url":"https://github.com/ibmdb/node-ibm_db/issues/147#issuecomment-237431096","issue_url":"https://api.github.com/repos/ibmdb/node-ibm_db/issues/147","id":237431096,"user":{"login":"chadbean","id":852768,"avatar_url":"https://avatars.githubusercontent.com/u/852768?v=3","gravatar_id":"","url":"https://api.github.com/users/chadbean","html_url":"https://github.com/chadbean","followers_url":"https://api.github.com/users/chadbean/followers","following_url":"https://api.github.com/users/chadbean/following{/other_user}","gists_url":"https://api.github.com/users/chadbean/gists{/gist_id}","starred_url":"https://api.github.com/users/chadbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadbean/subscriptions","organizations_url":"https://api.github.com/users/chadbean/orgs","repos_url":"https://api.github.com/users/chadbean/repos","events_url":"https://api.github.com/users/chadbean/events{/privacy}","received_events_url":"https://api.github.com/users/chadbean/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T01:59:25Z","updated_at":"2016-08-04T01:59:25Z","body":"I should also mention that I'm using version 0.0.19 of this package."}}
{"actor":{"display_login":"chadbean"}}