Pass data to a flat file to sql query

Hi all
I have the table table1 with the columns workitem_id, c1, c2, and c3, number of data for all type.

I use the following query

Select work_item_id, c1, c2, c3 from table1 where workitem_id (pass the values of flat file)

Suppose my table contains 500 work item ID and the flat file contains 1000 ID, my above query returns only 500, right?

I want to display all the work item IDS (1000) with c1, c2, c3 as 0.

Help, please.

Thank you

Vermorel

So you want to use a [EXTERNAL TABLE | http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/tablecls.htm#CNCPT1141]

now, suppose you called this 'TABLE_EXT '.

Now, you want to have a query as...

select
   te.COLUMN_NAME_HERE   AS work_item_id,
   NVL(t1.c1, 0),
   NVL(t1.c2,0),
   NVL(t1.c3, 0)
from table_ext te, table1 t1
where te.COLUMN_NAME_HERE = t1.workitem_id (+)

Tags: Database

Similar Questions

  • Export data in a flat file without use of FL

    Hello

    I'm looking for options where I can export data into a flat file without using a FL (line Layout) i.e., using only the App Engine.

    Please share your experience if you did something like this

    Thank you

    A simple way to export any folder (table/view) to a csv gall, is to create a set of lines and loops through all fields of record like below example code

    Local Rowset &RS;
    Local Record &Rec;
    Local File &MYFILE;
    Local string &FileName, &strRecName, &Line, &Seperator, &Value;
    Local number &numRow, &numField;
    
    &FileName = "c:\temp\test.csv";
    &strRecName = "PSOPRDEFN";
    &Seperator = ";";
    
    &RS = CreateRowset(@("Record." | &strRecName));
    &RS.Fill();
    
    &MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
    
    If &MYFILE.IsOpen Then
    
       For &numRow = 1 To &RS.ActiveRowCount
          &Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
    
          For &numField = 1 To &Rec.FieldCount
             &Value = String(&Rec.GetField(&numField).Value);
             If &numField = 1 Then
                &Line = &Value;
             Else
                &Line = &Line | &Seperator | &Value;
             End-If;
    
          End-For;
          &MYFILE.WriteLine(&Line);
       End-For;
    
    End-If;
    
    &MYFILE.Close(); 
    

    You can of course create an application for generic class call this piece of code.

    It will be useful.

    Note:
    Do not complain to me ;) on performance issues

  • Export data to a flat file HRMS

    Hi all!

    Are there ways to export related employees data in a flat file without using a client (PeopleCode or Integration Broker) application, it's simply generate a CSV of power of the UI?

    You can schedule a query and specify the output text format. Note that when you select View Log/Trace in the process monitor, you will see a file with a .csv extension. However, it opens by default in Excel, and even if you select Save instead of open, he will try to change the .xls extension. You will need to return to .csv.

  • Passes data from leaf of great pl/sql procedure as a parameter.

    Hello
    I use ORACLE Database 11 g and RHEL 5.

    I have a procedure in my database that will update the table required for a single value, which before the end users (Java). Now I want to change it to update several records in 'BULK'.

    I studied the SQL Loader and knowledge. But this time I want to insert data into an oracle table excel, if I want to pass data from excel to a procedure as a parameter. I also do this process in BULK mode.

    Here is an example of code that take input for a front end value and updates the table...
    PROCEDURE TAB_UPDATE (SYMBOL     IN SYMBOL_INDEX.SYMBOL%TYPE,
    END_DATE IN SYMBOL_INDEX.END_DATE%TYPE)
     IS
     BEGIN
         V_QRY1 := '';
         V_QRY2 := '';
         V_QRY1 := 'UPDATE SYMBOL_INDEX';
         V_QRY2 := 'SET END_DATE = '''||END_DATE||''' WHERE SYMBOL_IDENTIFIER = '''||SYMBOL||''' AND END_DATE IS NULL';
         PRO_EXEC(V_QRY1,V_QRY2);
     EXCEPTION
      -----------
     END TAB_UPDATE ;
    Now this simple plsql code of the procedure updates a record at a time, whenever the user needs to insert a new value of front end to update its value.

    Please suggest me how to perform this procedure to take value of parameter of an excel sheet and also update all records in BULK.

    Should I use varrays? If possible, please give some links or code samples...


    Thanks in advance!

    I don't know, because I can't test it now, but you say STAGE_ID (the last column) ends by "," while in your data there is no comma after the last value. You can try to add a comma and load again?

    Marcus

  • faced with the question when writing data to a flat file with UTL_FILE.

    Hi gurus,

    We have a procedure that writes the data from the table to a flat file. RAC is implemented on this database.
    While writing data if the current instance, this procedure creates two copies of the data in parts.

    Any body can help me to solve this problem.

    Thanks in advance...

    I also asked this question, but it seems no final solution...

    In any case, here are two possibilities
    (1) the directory for the file among all nodes share
    (2) run you a procedure on a specific node

  • How do I get the data of "Regulatory BOM" Formulation with SQL query output

    Hello

    We would like to implement a State of BiPublisher that displays "Regulation BOM" (wording-> click on TAB Formulation on exit Popup-> TAB Composition) information table.

    How could get us this information with an SQL query?

    Thank you

    Annarosa

    Hi, given 'Regulatory BOM' output of the Formulation are more complicated than expected. Attached is an example. You can test and make the appropriate changes to your report.

  • How to pass the values separated by commas in SQL query

    Hi all

    I use Oracle APEX 4.2

    I've created a report of iterative with condition 1 ITEM IS NOT NULL.

    This is the SQL query

    SELECT MY. ACCT_ID,

    JAI DETAILS

    The ACCT MA, ACCT_hist EB

    WHERE MY. ACCT_IK = EB. ACCT_IK

    AND MY. ACCT_ID IN (: P3_IN_MRN);

    A P3_IN_MRN element is a text field. The thing is that it works if I give a value, but its does not work if I have several values with comma separated as 123,345,543.

    What could be the solution for multiple values in the SELECT query.

    Really appreciate your help.

    I made use of this on pretty much every project I've worked on:

    https://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:210612357425

    Hope that helps.

    Duncs

  • How to view the flat file to ADF Flow task data

    Hello

    I have some data in a flat file.
    Now, I want to show the data in a table in the workflow of adf.

    Please help me to know how to achieve this functionality.

    Hello

    Have a look here: http://dstas.blogspot.de/2012/11/csv-files-with-adf-csvparser-example.html?m=1

    Once the file is loaded in a query of the VO, the workflow can construct the table by dragging the VO

    Frank

  • Create a flat file reconciliation events - a matter of design

    Hello

    I am currently evaluating an existing implementation of IOM to rebuild using OIM 11 g and have questions about the ideal method to create events for the reconciliation of a flat file.

    The current implementation uses a web service call to process a flat file and creates reconciliation events. It runs every hour.

    Although this looks cool, but I thought there was no need to go as far.

    If IOM cannot consume the flat file directly, which means that if he needs massage data, I can always load the flat file data in an external table, write a pl/sql procedure to transform the data and put it into a global temporary table, and create events of reconciliation like that.

    What would be the ideal method to load data from a flat file in IOM?

    Thank you

    Khanh

    If it is a flat file, then watched GTC option? And why no staged between the two? IOM can read flat files very well either through GTC or write your own recon code.

    -Marie

  • Export of table to flat file

    OWB 10.2.0.1
    DB 10.2.0.4

    I need to export data to a flat file, and the ADMINISTRATOR has implemented a directory object:
    CREATE DIRECTORY "TEST_OUT" AS '(PATH ON THE SERVER)'
    Warehouse Builder can use it in a file location (and if so, how)?

    An alternative would be to put the utl_file_dir in the init.ora file and then create a file location that refers to the value utl_file_dir?

    If none of those who won't work, which is a good way to export data from flat files?

    Thanks in advance.

    If you create a connector to the location of the Oracle where the mapping will be deployed to a location where the file is configured (in OWB) and name the connector with the same name as the SQL directory it should do the trick. OWB mapping with the file as a target use UTL_FILE routines with a Directory SQL name. OWB can give you cannot create directory SQL errors because it exists, but you should ignore these and be OK. A small number of if and of but here in version 11 GR 2, we have the same functionality as db links where the connector can use an existing or create a new.

    See you soon
    David

  • How to load flat files without header to table in ODI

    I try to get data from a flat file, but it doesn't have any header

    as 1, tom, 36, usa.

    I have a table with id column, name, age, country, and I want to get the data. Please let me know how to proceed.

    Thanks in advance

    If you add columns manually in the data model there is no need to reverse engineering. If you reverse engineer with header set to 0 ODI will simply give the columns arbitrary identifiers such as C1, C2, C3 etc. That you can leave or change.

  • Loading flat file in planning in ODI

    Hello

    I'm trying to load data from a flat file into the planning with ODI. When I create the model planning and try to reverse using the knowledge RKM Hyperion Planning module, I get an error in step 2 of the process: start the reverse.

    This is the code in the Description tab in the operator:

    from java.util import HashMap
    import java.lang Boolean
    from com.hyperion.odi.common import ODIConstants
    from com.hyperion.odi.common import ODIModelImporter
    from com.hyperion.odi.connection import HypAppConnectionFactory

    #
    source # planning of the connection properties
    #
    serverName = "epmdemo."
    userName = "demoadmin".
    password = "< @= snpRef.getInfo ("SRC_PASS") @ >.
    request = "PhysPrac."

    srvportParts = serverName.split(':',2)
    srvStr = srvportParts [0]
    portStr = srvportParts [1]

    #
    # Set connection properties and initializes the charger of planning
    #
    srcProps = HashMap()
    srcProps.put (ODIConstants.SERVER, srvStr)
    srcProps.put (ODIConstants.PORT, portStr)
    srcProps.put (ODIConstants.USER, userName)
    srcProps.put (ODIConstants.PASSWORD, password)
    srcProps.put (ODIConstants.APPLICATION_NAME, application)

    iMod = 10001

    connection of planning #get
    hApp = HypAppConnectionFactory.getAppConnection (HypAppConnectionFactory.APP_PLANNING, srcProps);

    #get connection to the repository
    repCon = odiRef.getJDBCConnection ("DEST")

    #
    # START THE REVERSE
    #
    odiModelImporter = ODIModelImporter (imod, hApp, repCon)
    odiModelImporter.importModels)


    and the error message from the explanation tab:

    org.apache.bsf.BSFException: exception of Jython:
    Traceback (innermost last):
    "< String >" file, line 17, in there?
    IndexError: index out of range: 1

    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    at com.sunopsis.dwg.codeinterpretor.k.a (k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting (SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders (SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders (SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt (SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt (SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask (SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep (SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession (SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand (DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.k (e.java)
    at com.sunopsis.dwg.cmd.g.A (g.java)
    at com.sunopsis.dwg.cmd.e.run (e.java)
    at java.lang.Thread.run(Thread.java:595)

    I should mention that I am a beginner with ODI.

    Thank you
    Adina

    Are you sure put you the port number of the rmi in the topology Manager, it does not appear that you have
    When you set the server in the topology for the Planning Manager is servername:11333
    For example:-http://4.bp.blogspot.com/__2AaArK5lW8/SNZicAzzHQI/AAAAAAAAAZw/zIdHfP0tnew/s1600-h/8.png

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Dynamic flat file as a source name

    Hello
    I'm working on a mapping that needs to read data from the flat file and insert into a table. I am able to do it for a fixed file name, but how can I do dynamic file name. in other words, I need to read the file name as orders06102010.txt on that day and orders06112010.txt etc. the next day etc. How can I make the dynamic source file name?

    Thank you

    This message can help you:
    http://blogs.Oracle.com/warehousebuilder/2007/07/process_flow_execute_a_map_for_all_files_in_a_directory.html

    See you soon
    Nico

  • Target of flat file

    Hi I have Oracle table as a source that has about 150 columns, and I have to load the data in the flat file. Is it possible that we can get the column names instead of
    manually enter all the column names.

    Thank you

    You can duplicate the oracle table data store, and then drag the data duplicated in your template file store. Rename the file data store and give it a file name (name of the resource).

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Flat file ODI at request of planning

    Hello

    I'm testing the loading of meta data from a flat file to the Planning by ODI. While on the interface, when I select the staging area which is different from the target and I'm trying to select the engine table Sunopsis memory as my sleeping area, it gives me the following warning:

    "The requested operation cannot succeed. The object no longer exists. There is no connection for pair/logical schema context: SUNOPSIS_MEMORY_ENGINE/HYPERION '

    My name of context here is hyperion.

    Clues

    See you soon

    Hello

    Go to the topology Manager. Physical architecture > expand Technologies > expand Sunopsis engine > expand SUNOPSIS_MEMORY_ENGINE
    Change SUNOPSIS_MEMORY_ENGINE_Default
    Context tab > add context 'Hyperion' and the logic diagram of "SUNOPSIS_MEMORY_ENGINE".

    Apply all, open the designer again and create your interface, you should be able to choose without error.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

Maybe you are looking for

  • cannot enter text in the new yahoo mail in firefox only

    I can't compose a new message in Yahoo in Firefox. I can install a new mail in Yahoo with Internet Explorer. I can't enter text in a field in a new yahoo email. When I try to respond to mail in my Inbox, I get a message that says: "Yahoo! Mail found

  • Want to 6 1010sv: Intel rapid storage 10 Windows software/driver

    Hello everyone! I noticed that Intel Rapid Storage process (32 bit) crazy sometimes, consuming a lot of CPU and RAM. In addition the control application storage quick, accessible via the Control Panel does not start. I would like to reinstall the dri

  • How can I write protect a USB

    I have an external USB formatted drive for Max OX extended (journaled). He has a backup of my music collection so I want to write protect it so that it can be READ and not deleted or all files deletion. How this is possible - running an iMac and El C

  • VAIO S13A36PG: Operating System Not found

    Need help please, my situation is as below: I decided to give a try to dual boot windows 8.1 (preinstalled with VAIO S on RAID0 (Intel RST)) and Ubuntu 14. However, all my boot entry on efi (left usb) to start. Even if the EFI partition. No matter ho

  • I have amassed a certain "Microsft' updated

    Now, first of all to start!I'm no computer whizz kid and be faithful won't be!BUT, I just looked in my 'Control Panel' (just to see) and I have amassed a certain "Microsft' updated?Can someone tell me (in terms laymans terms) what has happened!