Results 1 to 4 of 4

Thread: String DB or JDBC Nodes together

  1. #1
    Contributor
    Join Date
    May 2013
    Location
    Chicago, IL
    Posts
    52

    Default String DB or JDBC Nodes together

    Hello, how do I do something link this? I want to pass the account numbers from one query is a string to use in the next db/jdbc query node.... Thanks

    node:Carolinas_N_and_S_5
    bretype:core::JDBC Query
    editor:Label=Carolinas- N and S
    editor:sortkey=5009b4a46fab46f9_14
    input:5a72135e3c9b0933/=TIRKS_3.40fd2c7444283da6
    output:@439f475045133ba6/=
    prop:DbDriver=
    prop:DbUrl=
    prop:DbUser=
    prop:SqlQuery=<<EOX
    select
    ACTV_DATE,
    NPA,
    NXX,
    LINE,
    ID_NUM,
    USOC,
    RATE AS MRC,
    CKT AS CIRCUIT_LEG,
    SPP,
    TA,
    TA_DATE,
    SITE,
    NPA || NXX || LINE As BANFull

    from db.table

    WHERE BANFull IN BTN

    EOX
    prop:SqlQueryFieldBindings=BTN
    editor:XY=290,90
    editor:Notes=WHERE ID_NUM = '0000000000'
    editor:Notes=
    editor:Notes=
    editor:Notes=
    end:Carolinas_N_and_S_5

    node:TIRKS_3
    bretype:core::DB Query
    editor:Label=TIRKS
    editor:sortkey=5187cc0e21d05f09_3
    output:@40fd2c7444283da6/=
    encrypted:simple=nFZhmIpYZmvjMtRGF8lNF8JPgXP821U1Q xPga5KHl25Y
    prop:DbService=
    prop:DbUser=
    prop:SqlQuery=<<EOX
    SELECT
    CIRCUIT_IDENTIFICATION_CD
    ,NETWORK_CHANNEL_CD
    ,SBC_COMPANY_CD
    ,CIRCUIT_IN_SERVICE_DT
    ,BTN
    ,ACNA_CD
    ,ACTL_CLLI_CD
    ,TRACKING_NUMBER
    ,Circuit_Lst_N
    ,Circuit_ID_Lst
    ,Bill_Number_Lst

    FROM db.table a
    INNER JOIN
    THIRTY_DAY_TABLES.TTBN_Circuit_List_30 b
    ON
    trim(a.CIRCUIT_IDENTIFICATION_CD) = b.Circuit_ID_Lst
    EOX
    editor:XY=150,90
    editor:Notes=
    end:TIRKS_3
    Last edited by Brad Brezinski; 01-31-2018 at 08:37 PM.

  2. #2
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    757

    Default

    The answer depends a bit on which Database vendor you are working with, but try this first.

    In the second query.. change the Where clause to this:

    WHERE BANFull = ?

  3. #3
    Contributor
    Join Date
    May 2013
    Location
    Chicago, IL
    Posts
    52

    Default

    Hi, I do have it with the WHERE BANFull = ?. I get this error, "errlog:ERROR: error on row 0. com.ibm.db2.jcc.a.SqlException: [ibm][db2][jcc][10145][10844] Invalid parameter 1: Parameter index is out of range." I sent a zip with the node report files. Didn't want to attach to the thread.... I'm sure that I'm filling out the node wrong.... Thanks!

  4. #4
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    757

    Default

    Oh, sorry... You are using DB2.
    According to this link,
    https://www.ibm.com/support/knowledg.../c0020295.html

    either of these should work
    WHERE BANFull = ?
    or
    WHERE BANFull = :BTN
    Last edited by stonysmith; 02-01-2018 at 01:01 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •