Announcement

Collapse
No announcement yet.

Javascript SQL Help

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

  • Javascript SQL Help

    Hi Experts ,

    I am new to Mirth and was trying to create a Interface where we will take the data from the DB and create a delimited file for the patient estimates :

    The SQL I am using is error-ed out , can you please let me know the correct syntax to join two tables in Mirth

    var sql = " SELECT (837_claims_subscriber_new.subscriber_first_name) AS client_name ,"+
    "LTRIM(RTRIM(subscriber_address_1)) AS client_address_1 ,"+
    "LTRIM(RTRIM(subscriber_address_2)) AS client_address_2 ,"+
    "LTRIM(RTRIM(subscriber_city)) AS client_city ,"+
    "LTRIM(RTRIM(subscriber_state)) AS client_state ,"+
    "LTRIM(RTRIM(subscriber_zip)) AS client_zip "+
    "FROM 837_subscriber_add ";
    "left join 837_claims_subscriber_new on 837_subscriber_add.claim_id=837_claims_subscriber_ new.claim_id ";
    where updated='N'; ";

    When I am running this the field "837_claims_subscriber_new.subscriber_first_na me" is taken as a field as a whole .

    Please let me know the correct join statement I should use .

    Thanks in Advance !
    Anky

  • #2
    What error are you getting? Have you tried it without the parentheses around "837_claims_subscriber_new.subscriber_first_na me"?
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment

    Working...
    X