Name of ODI variable in the result of Oracle SELECT

Hello,
I seek to evaluate the contents of an ODI variable (VP) which is the result of SELECT with other ODI variables (V1, V2,…, Vn) in its contents.
Currently, the result of this first variable (VP) returns the name of the variables (V1 to Vn) and not the value of these variables.
For example :
My variable VP is a select from oracle (SELECT FIELD_NAME FROM TABLE_NAME WHERE XXX = VALUE)
The field FIELD_NAME contains "The #PROJECT.V1 is OK and the #PROJECT.V2 is KO".
I want to replace the two variables by their values.
Does there exist simple means of recovering the value of these variables instead of their names ?
Else, do you have a solution of skirting knowing that there can be several variables (V1 to Vn) and that they can be different according to the cases ?
I'm in ODI 10.
Thank you in advance for your assistance,

Thanks for your answer.
The second solution isn't possible to us because we don't know which variables are included in the SELECT result. We can have many variables and it is not always the same variables.
For the first solution, I try to find the link between the data of table SNP_VAR_DATA and a session (SESS_NO). Unfortunately, I do not arrive there.
Can you how make ? And by which tables of ODI ?
Thanks in advance,

Similar Messages

  • Linux file name into ODI variable

    Hello All,
    I have a situation where we have files in one directory in linux ,I want to import the file name into a ODI variable.
    Ex : A_B_C_2014_01_20.zip (inside this zip file are the flat files with data) is the file name in /u02/source_files location , i want this into a ODI variable and once the data loading is complete ,i want to log it saying
    A_B_C_2014_01_20.zip complete
    A_B_C_2014_01_21.zip complete.
    So my other shell script will look for the complete flag and copy the next file into the ODI pick up location.In this case I need to pick up A_B_C_2014_01_22.zip and start the data loading.
    How do i implement this functionality in ODI. Please let me know.

    Issue was due to a syntax error. Case closed.
    Thanks!
    -OS

  • CAN I PASS A TABLE NAME AS A VARIABLE IN THE FROM CLAUSE?

    For some reason, I am trying to use a variable name containing the actual table name in the from clause and it won't allow me. I keep getting the error saying I need to declare the variable I'm using eventhough I've used it in another statement that is not the FROM clause.
    Example
    SELECT count(col1), sum(col2)
    FROM v_table_name;
    v_table_name was declared as:
    v_tablename VARCHAR2(20);
    v_tablename := real_table_name;
    Is it not allowed to use variables in the FROM clause or am I missing something here?

    You can use the Forms "From Clause Query" as the datasource for the data block. Then you can change the QUERY_DATA_SOURCE_NAME using set_block_property, so you can use any SQL statement you like. Of course you must name/alias the columns in a consistent manner so that the number of database items on the block matches those being queried.

  • How to execute unix command through odi and store the result in table

    I have to reconcile  if data is loaded in table from csv file or not . I have to create a oracle data integrator package/interface/procedure to execute unix command to count number of rows in the csv files and store the count result in a table then i have to query the loaded table and count number of rows there and store in the table and have to compare is counts are same or not,  Please assist me how to make package/interface/procedure to  execute unix command and store result in oracle table.
    Thanks in Advance

    Use ODI OS command tool in the ODI package.
    create an interface in ODI using LKM File to Sql and the output file generated with the csv file's row count as a source and the db table(where the count needs to be stored) as a target

  • Pass the results from a selection formula to the default values for a parameter field

    Post Author: kevans
    CA Forum: General
    Crystal 10 u2013 SQL 2000
    I want to create a parameter field that will display all of our IT Departments so the end user can select the one they want to run the report against, such as IT-Security, IT-Network, etc. about 40 in all.  BUT I donu2019t want this to be a static list where I type in all 40 depts in the default list, I was hoping I could do something more dynamic such a formula field that says u201C if {group.name startswith u2018ITu2019 then {group.name}u201D and then have the parameter field pull from this source.
    Iu2019m sure this has been answered in a previous post but Iu2019m not finding it.  I see stuff on creating a record selection formula such as u2018if {?group} like u2018IT-Secur*u2019 thenu2026u201D  but this leaves too much room for error if people donu2019t type the name correctly.  Maybe Iu2019m not using the record selection formula correctly?  Sorry if I offend anyone but I just upgraded from 8 to 10 and thought for sure this option would be in 10, perhaps built right into the parameter default value page where you can place in select criteria but NOTHING has changed.

    Post Author: sharonmtowler
    CA Forum: General
    if you are creating the parameters in the rpt file, it will only pull values you enter, or directly from the database
    in the record selection you can do something like this, so if they only enter the first 2 characters it should pick up only the IT etc.
    (if eft(,2)={?parameter} then true else ={?parameter})

  • Executing Procedure in SQL SERVER and Storing the results in Oracle 10g

    Hello,
    I am trying execute SQL SERVER procedure from Oracle 10g and store the results in a oracle table. When I tried executing the procedure i am getting errors.
    I am using Oracle Heteroeneous Services.
    Steps I followed.
    1. Created ODBC DSN on Oracle Server connecting to SQL SERVER database.
    2. Created Listner entry and TNSNAMES entries.
    3. Created Database link and able to select the data from the SQL SERVER tables.
    Here is the code i tried to execute the procedure.
    BEGIN
    "META"."extract"@abc;
    END;
    "META"."extract"@abc;
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'META.extract@ABC' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    Please help me.
    Thank You,
    Seshadri Thope

    Hi thopevs,
    Can you please tell me the right syntax of calling procedures(on sql server) from oracle?
    I am getting following error:
    SQL> execute "GetdateSys"@oratosql;
    begin "GetdateSys"@oratosql; end;
    ORA-06550: line 2, column 7:
    PLS-00201: identifier 'GetdateSys@ORATOSQL' must be declared
    ORA-06550: line 2, column 7:
    PL/SQL: Statement ignored
    SQL>
    Your help will be highly appreciated.
    Thanks & Regards,
    M.U.N.A

  • Oracle 11g SUM function on the result of inner Select

    The inner Select returns rows with the values. The outer select running on tthe result of inner select SUM the result of the inner select.
    Although there are valid rows of the inner select the SUM in the outer SELECT return NVL. As a comment any aggregate function on the outer select returns NVL.
    The query is below.
    select a.yil,
    a.ay,
    sum(brut_prim),
    sum(kom),
    from (SELECT oid_pol_kesilen_acente,
    to_char(pp.zeyil_tanzim_tar, 'yyyy') yil,
    to_char(pp.zeyil_tanzim_tar, 'mm') ay,
    sum(decode(substr(pp.no, 1, 1),
    'T',
    pp.zeyil_brut_prim_fark / 2,
    pp.zeyil_brut_prim_fark)) -
    sum(pp.zeyil_gv_fark) brut_prim,
    sum(pp.zeyil_acente_kom_fark) kom
    from pol_police pp, org_acente oa
    WHERE SUBSTR(PP.NO, 1, 1) != 'D')
    group by oid_pol_kesilen_acente,
    to_char(pp.zeyil_tanzim_tar, 'yyyy'),
    to_char(pp.zeyil_tanzim_tar, 'mm')) a
    group by a.yil, a.ay, oid_pol_kesilen_acente
    Edited by: [email protected] on May 7, 2010 2:09 AM
    Edited by: [email protected] on May 7, 2010 2:31 AM

    Hi,
    please try the below sql:
    select a.yil, a.ay, sum(brut_prim), sum(kom),
    from (SELECT oid_pol_kesilen_acente,to_char(pp.zeyil_tanzim_tar, 'yyyy') yil, to_char(pp.zeyil_tanzim_tar, 'mm') ay,
    sum(decode(substr(pp.no, 1, 1), 'T',nvl(pp.zeyil_brut_prim_fark,0) / 2,nvl(pp.zeyil_brut_prim_fark,0))) - sum(nvl(pp.zeyil_gv_fark,0)) brut_prim,
    sum(nvl(pp.zeyil_acente_kom_fark,0)) kom
    from pol_police pp, org_acente oa
    WHERE SUBSTR(PP.NO, 1, 1) != 'D'
    group by oid_pol_kesilen_acente,
    to_char(pp.zeyil_tanzim_tar, 'yyyy'),
    to_char(pp.zeyil_tanzim_tar, 'mm')
    ) a
    group by a.yil, a.ay, oid_pol_kesilen_acente ;
    Thanks,
    Siva

  • Function that return the results of a select

    Hi,
    I would like to create a function on the famous HR oracle Departments table to select * from it. I don't know how to do it.
    Does anybody can help me?.
    Thank you

    Oracle stored functions cannot directly return result sets but can return REF CURSOR. Please read [Optimize Result Set Retrieval Using ODP.NET and Ref Cursors |http://www.oracle.com/technology/pub/articles/mastering_dotnet_oracle/williams_refcursors.html] which gives full examples in PL/SQL for server side and in VB. Net for client side.

  • Not able to set the variable to the variant in dynamic selections

    HI,
    I got a ticket related to variant. The variant is created to the report and logical database is added in the attributes of the report so that we can have the option to choose the dynamic slections. Variables are created in TVARVC table. I am able to set the variable by pressing F4 in dynamic selections to the variant. When i save and comeback, i am not able to see the variables in the dynamic selections. I can save the variables in static selections and it is working fine. Pleas help me i need this urgently.

    Hi,
    maybe sth wrong with the passing of parameters in the value help of the affected field.... Pls check.
    BTW: do u pay us for solving your customer tickets? (-;
    Cheers,
    André

  • How to JOIN the results of multiple SELECT statements

    Hello,
    I currently have a table where each row represents a single census date for a given tag number, where each tag number can have multiple census dates and data which are represented by their own row in the table.
    I currently have 2 SELECT statements that select all tag numbers given a census date, and would like to combine those 2 queries so that the data is presented in a manner such that for each tag number, instead of obtaining 2 rows for each tag number, I would be presented with 1 row for each tag number consisting of three columns: tag_number, data1, and data2.
    Both of the requested dates are not necessarily present for all tag numbers, and in the event that only one date is present, the other column should contain null, but if both dates are not present for a given tag number, the tag number is omitted.
    The two queries I would like to JOIN are:
    SELECT a.tag_number, a.data AS data1
    FROM tab1 a
    WHERE
    a.census_date='11/21/2009'and
    SELECT b.tag_number, b.data AS data2
    FROM tab2 b
    WHERE
    b.census_date='11/24/2009'The table from which I am selecting the data looks like such:
    tag_number  census_date     data
        1       11/21/2009      10
        1       11/23/2009      11
        1       11/24/2009      12
        2       11/19/2009      13
        2       11/21/2009      14And the data that I would like to result looks like:
    tag_number  data1           data2
        1       10              12
        2       14              nullAny help would be greatly appreciated.
    Thank you in advance,
    -Justin
    Edited by: m8r-qbkka9 on Nov 24, 2009 4:17 PM

    Hi,
    This looks like a job for pivot
    SELECT       a.tag_number
    ,       MAX (CASE  WHEN a.census_date = TO_DATE ('11/21/2009'
                                                       'MM/DD/YYYY'
                   THEN a.data
                END
               )          AS data1
    ,       MAX (CASE  WHEN a.census_date = TO_DATE ('11/24/2009'
                                                       'MM/DD/YYYY'
                   THEN a.data
                END
               )          AS data2
    FROM      tab1    a
    WHERE       a.census_date  IN ( TO_DATE ( '11/21/2009'
                                      , 'MM/DD/YYYY'
                       , TO_DATE ( '11/21/2009'
                                      , 'MM/DD/YYYY'
    GROUP BY  a.tag_number
    ;Comparing DATEs to stirngs, like '11/24/2009', is simply asking for trouble.
    Always use a conversion function (like TO_DATE) or DATE literals instead.

  • How do I return the results of two SELECT statements in to one result?

    I want to do this without using UNION.
    Here's an example of what I'm trying to do:
    I have a table called COUNTRY with the following columns:
    COUNTRY
    COUNTRY_CODE
    DATE_VISITED_LAST
    POPULATIONI have another table called STATE_COUNTY with the following columns:
    STATE_COUNTY
    COUNTRY_CODE
    STATE_COUNTY_CODE
    DATE_LAST_VISITED
    POPULATIONI have a third table called TOWN with the following columns:
    TOWN
    COUNTRY_CODE
    STATE_COUNTY_CODE
    TOWN_CODE
    DATE_LAST_VISITED
    POPULATIONNow through the interface I have, a user will supply a country code. I need a SELECT statement that will return a table with the following result set:
    The COUNTRY_CODE entered including the DATE_LAST_VISITED and POPULATION for this country
    ------> All the associated STATE_COUNTY's belonging to this country along with the DATE_LAST_VISITED and POPULATION for each STATE_COUNTY_CODE.
    -------------> All the associated TOWN_CODE's belonging to this state_county and country along with the DATE_LAST_VISITED and population for each TOWN.
    So the table will have 9 columns:
    COUNTRY
    DATE_LAST_VISITED_COUNTRY
    POPULATION_COUNTRY
    STATE_COUNTY
    DATE_LAST_VISITED_STATE_COUNTY
    POPULATION_COUNTY
    TOWN
    DATE_LAST_VISITED_TOWN
    POPULATION_TOWNAny ideas how this can be done?
    Thanks.

    Hi guys,
    Would it be ok to do it like this (with a join):
    SELECT      
         c.country_code,
         c.date_last_visited AS DATE_LAST_VISITED_COUNTRY,
         c.population AS POPULATION_COUNTRY,
         s.state_county_code,
         s.date_last_visited AS DATE_LAST_VISITED_STATE_COUNTY,
         s.population AS POPULATION_COUNTY,
         t.town_code,
         t.date_last_visited AS DATE_LAST_VISITED_TOWN,
         t.population POPULATION_TOWN,
    FROM
         country c
         LEFT OUTER JOIN state_county s ON s.country_code = c.country_code
         LEFT OUTER JOIN town       t ON t.country_code = s.country_code
    AND                                       t.state_county_code = s.state_county_codeThe results required would be something like:
    Country_Code     DATE_LAST_VISITED_COUNTRY     POPULATION_COUNTRY     STATE_COUNTY_CODE         DATE_LAST_VISITED_STATE_COUNTY         POPULATION_COUNTY     TOWN_CODE     DATE_LAST_VISITED_TOWN     POPULATION_TOWN
    UK               14-JAN-09                     56,00000               London                    18-JUL-99                              23,0000               Ascot         30-JUN-89                  12,000
                                                                                                                                                                 Brixton       28-JAN-92                  4,684
                                                                          Birmingham                12-SEP-09                              55,678                Solihull      12-OCT-81                  6.768 Does this make sense?
    Thanks!
    Edited by: Sastry on Nov 2, 2009 2:04 AM

  • Get the file name into a Odi variable

    Hi,
    I need to get the file name into odi variable like ..A/ETC/file.txt
    For eg.the filename file.txt should get store in a variable.
    Then i want to compare the file name stored in the variable with some other value.
    Please suggest.
    Thanks.

    in package,
    declare the variable, then evaluate it with another variable, generally using # syntax
    if the variable is date type, suggest to use : syntax, because # will treat the variable value as text value
    in loadplan
    use case when syntax,

  • Pass a Value to Variable from the unix environment in ODI (ELT)

    Hi
    i am very new to ODI environment.
    i want know how to pass a value to variables in oracle data integrator from unix environment.
    Example:
    Variable name : Sales
    for variable name sales i want to pass the value from unix environment.
    Regards,
    Raj
    Edited by: user11137587 on Aug 19, 2009 6:26 AM

    Work Around !
    You can execute OS commands using Jython script. Probably you need to flush your enviornment variables value into a file using jython script and then read those value into ODI variable from the file.
    BUt may I know why you want to read environment variable vaules in ODI, Dont you think this will make your application less portable
    Regards,
    Amit

  • How to execute a procedure depending on the result of a query?

    Hello, I'm new in ODI.
    I want to execute a procedure depending on the result of a query Oracle table.
    We have a Oracle Table whit a column that contains two possibles values.
    I want read the table, row by row, and depending on this value, execute a Procedure or execute another.
    How can i do?

    what you need to do is
    1. create a variable which "new_var2" which has the count of the number of rows you want to process. must be data type numeric.
    2. copy "new_var2" to the package screen.
    3. duplicate the "new_var2" on the package screen and evaluate the variable and test for "> 0" zero, call it "new_var2_E"
    3. create a new odi variable "new_var1" with a refresh of "select field1 fom (select field1,rownum as rownumber from tablex) where rownumber = #new_var2" in the relevant schema and technology.
    4. copy "new_var1" into your package (some where in the flow)
    5. right click the "new_var1" variable in you package screen and you should get the option duplicate step (click on that)
    6. select the the duplicate "new_var1" on the package screen and correct the the name to something meaning full to you "new_var1_E", also change the "type" to "evaluate variable" then you should see a "value" box. enter one of the values you want to test in the box (remember do not put in quotes ' )
    7. now back on the package screen join the "new_var1" to the "new_var1_E" with an OK line
    8 you now join "new_var2" to "new_var2_E" with OK
    9 you join "new_var2_E" to "new_var1"
    10. you then join the "new_var1_E" with an OK or a KO line to the relevant procedure.
    12. you need to duplicate "new_var2" in the package screen one more time this time and call it "new_var2_D" set the type to evaluate and then select the increment of -1
    13. the relevant procedure to "new_var2_D" with an OK
    14. join the "new_var2_D" to the "new_var2_E" with an OK
    15. this should close off the loop now the exit point is "new_var2_E" with a KO line to the next part of your process....
    Basically you should end up with a loop on new_var2 decementing, and it is used to get a specific next record row from your table.
    Hope this helps, sorry it is a little long winded..
    Edited by: DavidGD on Feb 8, 2009 3:29 PM

  • Problem: Use an ODI variable in a Java Procedure

    Hi and thanks in advance,
    i need to use a project variable in a java procedure i've written. In particular i should read a file (and manage it...), but its name is stored in avariable called #fileName that i refresh each time.
    writing something like:
    <% FileInputStream fis = new FileInputStream(C:\\"+"#filename");
    etc.
    etc.
    %>
    doesn't work...
    How can i use the value of my ODI variable inside the Java code?
    Please, help me if you can...
    Thank you very much.

    Any Idea? Please, this question is blocking me...

Maybe you are looking for

  • BPM RFC synch send step

    Hi I am using RFC synch send step with in parforeach block in BPM. do I need to activate correlation to correlate synchronous request and synchronous response for RFC synch send step ? Please let me know if you have any ideas on this. Thanks Anand

  • External harddrive won't sleep in Yosemite

    This has been happening since previous OS (Mavericks).  Any tips to share, anyone?

  • BPM uses

    hi guruz, where we use BPM scenerio in XI, in what type of requirement we use BPM. Is it avoidable or not . please guide me. warm regards.

  • Matching Shot Plug in for FCP 7???

    HI, Is there a piece of software or 3rd Party Plugin that lets you match one shot to another? I have a wedding ceremony that was shot with 2 cameras. The main camera looks great. The color is fine. The second Camera, B-Roll footage, looks a little of

  • UNDEFINED Column

    Hi, Some tables in my database Oracle 10gr2 are UNDEFINED; SQL> desc DBA_HIST_ACTIVE_SESS_HISTORY; Name Null? Type SNAP_ID NUMBER DBID NUMBER INSTANCE_NUMBER NUMBER SAMPLE_ID NUMBER SAMPLE_TIME UNDEFINED SESSION_ID NUMBER What does this mean? Adith