#1
|
|||
|
|||
![]()
I'm using a File Reader --> Database Writer channel (to Postgres).
It works when I use a hard-coded value like this: var result = dbConn.executeUpdate("INSERT INTO patient (medicalrecordnumber) VALUES ('12345')"); As expected, it places the value 12345 in the db. It does NOT work when I do the following: var result = dbConn.executeUpdate("INSERT INTO patient (medicalrecordnumber) VALUES ($('MedicalRecordNumber'))"); I simply drug over the $('MedicalRecordNumber') from the "Destination Mappings" column on the right side of the screen, after having mapped it in the transformer. I've tried several different tweaks to the syntax. Anyone able to offer insight? Thanks! - Rod
__________________
Rod Sellers "Psalm 34:3" |
#2
|
|||
|
|||
![]()
have you tried
var result = dbConn.executeUpdate("INSERT INTO patient (medicalrecordnumber) VALUES (" + $('MedicalRecordNumber') + ")"); you may also need to include \' around the value |
![]() |
Tags |
database writer, postgres, syntax |
Thread Tools | |
Display Modes | |
|
|