Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Execute SQL Script (2)

  1. #1
    Join Date
    Feb 2011
    Posts
    240

    Default Execute SQL Script (2)

    In attachments there is the SQL script.

    I've create the table sins_intsoc. I stuck to the line: UPDATE sins_intsoc a
    .......

    I do not know how to do
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2008
    Posts
    107

    Default

    > In attachments there is the SQL script.

    Okay


    > I've create the table sins_intsoc.

    Okay


    > I stuck to the line: UPDATE sins_intsoc a

    I've no idea what this means. There's also multiple lines in your script which start like this, so I don't know which one you are referring to.


    > I do not know how to do

    I've no idea what your question is.


    Paul

  3. #3
    Join Date
    Feb 2011
    Posts
    240

    Default

    After populating the table sins_intsoc, I must run the update:

    UPDATE sins_intsoc a
    SET (prop_data_inizio, prop_data_fine, prop_importo, aut1_parere,
    aut1_data_inizio, aut1_data_fine, aut1_importo, aut2_parere,
    aut2_data_inizio, aut2_data_fine, aut2_importo,
    tipo_contrib_cod, tipo_contrib_des, contrib_cod, contrib_des) =
    (SELECT data_inizio_prop, data_fine_prop, importo_proposto,
    DECODE (parere_comm, '1', 'A', '2', 'R', NULL), data_inizio,
    data_fine, importo_comm1,
    DECODE (parere_comm2, '1', 'A', '2', 'R', NULL),
    data_inizio_comm2, data_fine_comm2, importo_comm2,
    tipo_contrib, tc.tc_descri,
    cod_contrib, su.descrizione_suss
    FROM sins.ass_contrib b, sins.tipocontr tc, sins.sussidi su
    WHERE a.cartella = b.n_cartella
    AND a.cod_obbiettivo = b.cod_obbiettivo
    AND a.n_progetto = b.n_progetto
    AND a.n_intervento = b.n_intervento
    AND b.tipo_contrib = tc.tc_codice (+)
    AND b.cod_contrib = su.codice_suss (+))
    WHERE EXISTS (
    SELECT n_cartella
    FROM sins.ass_contrib c
    WHERE a.cartella = c.n_cartella
    AND a.cod_obbiettivo = c.cod_obbiettivo
    AND a.n_progetto = c.n_progetto
    AND a.n_intervento = c.n_intervento);

    How can I translate this code in kettle?

  4. #4
    Join Date
    Feb 2008
    Posts
    107

    Default

    One option would be to use the method I described in the first thread.

    Did you try it ? Did it work ? If not, what happened ?

    Cheers,
    Paul

  5. #5
    Join Date
    Feb 2011
    Posts
    240

    Default

    ok, thanks very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.