Announcement

Collapse
No announcement yet.

writing integers to Postgres via data writer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • writing integers to Postgres via data writer

    Hi,

    I am very new to Mirth and just trying to understand the basic constructs. We are currently looking at replacing an eGate drive for a small CIS. The eGate interface is structured to write the message id as an "int" to an int field in the CIS Postgres database. I have been strugling to replicate this with Mirth. A simple question - is it possible to write (convert) an data variable integer via an INSERT statement? We are using a simple transformer to disect messages and then passing data as ${msg_id} via an INSERT statement. If it is possible - what would be the syntax?

    Thanks in anticipation

    N

  • #2
    Re:writing integers to Postgres via data writer

    Ok - so I may have answered my own question - is this a reasonable approach?


    Code:
    INSERT IGNORE INTO record (msg_id,msg_date_time) 
    VALUES (TO_NUMBER(${msg_id}, '99999999'),DATE(${msg_date_time}));

    Comment

    Working...
    X