Filename seperately & Putting data from Hash Map to two different columns

The following code produces the output as :
$ java getNamefile
File Name : reaper.txt
File Name : Testing
Is it possible to just get the file name "reaper" from it instead of reaper.txt
import java.io.*;
class getNamefile
     public static void main(String[] args)
          File f1 = new File("C:/javamyprograms/reaper.txt");
          File f2 = new File("C:/javamyprograms/Testing/");
          System.out.println("File Name : " + f1.getName());
          System.out.println("File Name : " + f2.getName());
}Secondly I am trying to put the values from a HashMap into ".xls"
PrintWriter out = new PrintWriter (new FileWriter("Unique_words_count" + file) + ".xls");
and out.write(key + " " + hm.get(key));
This put the values in the same columns. I want the results to be two different columns like
column1 column2
key1 value1
key2 value2
Please do advise. Thanks in advance.

Is it possible to just get the file name "reaper"from it instead of reaper.txtActually, I ran a test, and
     System.out.println(  "file name portion == " + ( f.getName().split( "\\." ) )[ 0 ] );works also:
This has the same effect as:
     String fileName = f.getName();
     String splitFileName[] = fileName.split( "\\." );
     System.out.println(  "file name portion == " + splitFileName[ 0 ] );Now that I think about it, the second form is more easily understood. There is really no reason to do it the first way. Just interesting to note that you can.

Similar Messages

  • Collecting data from advantech-usb4704 with two different apps at the same time

    I wonder if I can access to Advantech-4704 with two different applications at the same time?
    I use this block in my vis.
    I have enough ports, but inputs are needed in completely different applications. Do I have to close one of them or can they run simultaneously?
    Thankyou!

    Dear gtu,
    as nathand said, usually it is not supported to access the same physical resource simultaneously from multiple programs. In case of DAQmx for instance, you will get an error message which says that the resource is already reserved. I suppose the same would happen with your driver, however it might be worth a try.
    One workaround could be however if you revise your applications and merge the codes if it is possible so that no concurent resource allocation takes place.
    Best Regards,
    Adam Cseh
    Applications/Systems Engineer
    National Instruments

  • How to put data from database into array

    I need to answer hot to put data from database directly into array.
    I tried like the code below but the error message said: java.lang.ArrayIndexOutOfBoundsException: 0, and it points to this line: numbers [row][0]= rs.getString("ID");
    Hope you can help.
    ResultSet rs = stmt.executeQuery(query);
         int row=0;
         String [] [] numbers=new String [row][10];
         // output resultset
         while ( rs.next() )
              numbers [row][0]= rs.getString("ID");
              numbers [row][1]= rs.getString("name");
         row++;
         // close resultset
         rs.close();
    thanks,Devi

    The exception is been thrown simply because you assigned '0' to the 'row' variable, indicating a zero length of the array. In fact you should assign the row count to it.
    After all, don't do that. Make use of the Collection framework and map the ResultSet to a Collection of DTO's.
    List<User> users = new ArrayList<User>();
    while (resultSet.next()) {
        User user = new User();
        user.setID(resultSet.getString("ID"));
        user.setName(resultSet.getString("name"));
        users.add(user);
    }

  • How to put datas from database in html�s forms?

    Does anyone have any idea how to put datas from the database using JSP???

    One option: put your data into a JavaBean and then put that into the session. You can then access it from your JSP. You can access the properties of the bean using the basic JSP scripting elements, or if you want to get fancy, both JSTL and Struts have a bunch of custom tags for working with JavaBeans.

  • How do I put data from every XMLnode related,in separate movieclips when clicking a line in combobox

    How do I put data from every XMLnode related,in separate movieclips when clicking a line in combobox?
    A sample from the XML is like this:
    <Planter>
              <Lauvtre>
                        <Botanisk_navn>Acer campestre</Botanisk_navn>
                        <Norsk_navn>Naverlønn</Norsk_navn>
                        <Farge>Grønn</Farge>
                        <Herdighet>H4</Herdighet>
                        <Høyde>10-15 m</Høyde>
              </Lauvtre>
    I have a combobox where it shows the Botanical name, and the Norwegian name. But the rest of the info has to be shown in separate movieclips.
    Anyone have an idea how to do this? Can I use the trace function maybe? Here is my AS3 code so far:
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, onLoaded);
    list.addEventListener(Event.CHANGE, itemChange);
    function itemChange(e:Event):void
              ta.text = list.selectedItem.data;
              tb.text = list.selectedItem.label;
    var xml:XML;
    function onLoaded(e:Event):void
              xml = new XML(e.target.data);
              var il:XMLList = xml.Planter.Lauvtre;
              for(var i:uint=0; i<il.length(); i++)
                        list.addItem({data:il.Farge.text()[i] +"\n"+ il.Herdighet.text()[i]+"\n"+ il.Høyde.text()[i],
                                                                label:il.Botanisk_navn.text()[i] +"\n"+ il.Norsk_navn.text()[i]});
    loader.load(new URLRequest("lauvtre.xml"));
    Thanks!
    Rheus.

    Hi! And thank you for helping. Planter is my root node. I tried removing "Planter" from xml.Planter.Lauvtre. It didn't fetch any data then. My code works as is, but what I want the code to do, is to put these 3:
        <Farge>Grønn</Farge>
        <Herdighet>H4</Herdighet>
        <Høyde>10-15 m</Høyde>
    ...into separate textfields.
    It has to be dynamic, so that when I click on one of the plant names in the combobox, the textfields get updated according to what is selected in the combobox.
    I'm pretty new to Actionscript so I have a hard time explaining my problem:
    I want to use the combobox as the menu, that has all the latin plant names listed. When I click on one of the 100 plantnames I want the correlating info from the XML, put in textfields.

  • Script to put Datas from Database to TextInput

    Hello,
    As it is said in the title, I would like to put Datas from Database to Textinput. Here's my application :
    Well, what I want to do is when you click on the lines in the Datagrid, the "Nom Area" is completed by the Name in the Datagrid, the "adresse area" by the adress in the Datagrid ...
    Can someone help me ? please
    Thank you

    Here's my code
    <code>
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:fourD="http://www.4d.com/2007/mxml" layout="absolute"  viewSourceURL="srcview/index.html" backgroundGradientAlphas="[1.0,1.0]" backgroundGradientColors="[#EDE3E3, #555555]" color="#040404" height="899">
    <mx:Script>
    <![CDATA[
    import fourD.sql.*;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var _resultSet:SQLResultSet;
    // Initialisation de la connection
    private function connectHandler(event:Event):void
    fourDSQLService.execute("SELECT * FROM clients"); }
    private function resultHandler(event:ResultEvent):void
    if(event.result != null) { _resultSet = event.result as SQLResultSet; } }
    // En cas d'erreur
    private function faultHandler(event:FaultEvent):void
    var zeError:String= "Error #" + event.fault.faultCode;
    // Message d'erreur
    Alert.show(event.fault.faultString,zeError); }
    ]]>
    </mx:Script>
    <!-- Declaration du serveur SQL-->
    <!-- Connection automatique au dŽmarrage de l'application (login/mdp)-->
    <!-- ImplŽmentation des fonctions -->
    <fourD:SQLService id = "fourDSQLService"
    host = "127.0.0.1"
    userName = "sqlUser"
    userPassword="sql"
    autoConnect="true"
    result = "resultHandler(event)"
    fault = "faultHandler(event)"
    connect="connectHandler(event)"
    />
    <!-- Declare the 4D datagrid; It is also possible to use Flex embed datagrid -->
    <!-- Bind datagrid source to SQLresultSet coming from 4D-->
    <fourD:DataGrid id="contacts_dg"
    dataProvider="{_resultSet}" x="10" y="207" width="737" height="397"
    />
    <mx:Button x="588" y="627" label="Ajouter" id="btnAjouter"/>
    <mx:Button x="666" y="627" label="Supprimer" id="btnSupprimer"/>
    <mx:Text x="10" y="10" text="Nom" />
    <mx:Text x="10" y="36" text="Secteur d'activitŽ&#xd;"/>
    <mx:Text x="10" y="62" text="Groupe"/>
    <mx:Text x="10" y="112" text="Responsable commercial"/>
    <mx:Text x="10" y="88" text="Adresse"/>
    <mx:Text x="416" y="88" text="Ville"/>
    <mx:Text x="595" y="88" text="Code Postal"/>
    <mx:Text x="10" y="138" text="Responsable production&#xd;"/>
    <mx:Text x="416" y="112" text="Responsable 3"/>
    <mx:Text x="416" y="138" text="Responsable 4"/>
    <mx:Text x="624" y="10" text="Code"/>
    <mx:RadioButton x="610" y="34" label="Client"/>
    <mx:RadioButton x="675" y="34" label="Prospect"/>
    <mx:TextInput x="48" y="8" width="568" id="nomArea" />
    <mx:TextInput x="117" y="34" width="485"/>
    <mx:TextInput x="666" y="8" width="81"/>
    <mx:TextInput x="675" y="86" width="72"/>
    <mx:TextInput x="63" y="60" width="684"/>
    <mx:ComboBox x="157" y="110" width="251"></mx:ComboBox>
    <mx:ComboBox x="157" y="140" width="251"></mx:ComboBox>
    <mx:ComboBox x="512" y="110" width="235"></mx:ComboBox>
    <mx:ComboBox x="512" y="140" width="235"></mx:ComboBox>
    <mx:Text x="317.5" y="161" text="Liste Clients" fontSize="19"/>
    <mx:TextInput x="63" y="86" width="345"/>
    <mx:TextInput x="452" y="86" width="135"/>
    </mx:Application>
    </code>

  • Data from one table shown on different table

    Back again...I am working on a budget sheet.  I thought I had a good plan for a way to deal with my different budget categories.  I have, on one sheet, several small tables that keep a running account of my money in various budget line items (mortgage, utilties, grocery, etc...).
    My plan was to take the running total of one table and insert it into a master list of all budget categories.  I thought I could do this easily with a simple command of making one cell just equal another cell.  But then two problems surfaced.
    First, and by far I think the biggest problem, is that I don't know how to tell one cell on one table to grab data from another cell on a different table.
    Is there a way?
    Second, since the smaller individual tables are running....even though I have a footer that serves as the base, continuing total...every time I add a row to that table, the bottom row will grow by 1.  So, I am not sure (in fact I doubt it can be done), is there a way to tell the summary table to always know where the running, final total is on any given table?
    I suppose, finally, if there is some other easier way to do this, I would appreciate the collective wisdom of the group. 
    Oh, I am working in old Numbers '08.  Should have said that first.  Thanks in advance.

    To make a refernce to a cell in a different table is the same as making one from the same table. When it is time to make a cell reference, click on the cell in the other table.  If it is on a different sheet, first click on the other table in the sidebar (I assume '08 has a sidebar on the left), then click on the cell. Or you can type it in as sheetname::tablename::celladdr.
    If the cell you want to reference is in a footer, a formula like =Sheet 1::Table 1::B2 will do the trick.  When you add a new row to the table, the reference will adjust so it keeps pointing at the cell in the footer.

  • Getting DISTINCT count from two different columns

    Hi all,
    I have following query which gives currency code from two different tables. I would like to get the distinct count of currency codes from these two different columns.
    SELECT eb.person_seq_id, eb.bonus_amount, eb.currency_cd, ed.currency_cd_host
    FROM fr_emp_bonuses eb, fr_emp_details ed, fr_periods p
    WHERE eb.person_seq_id = ed.person_seq_id AND ed.period_seq_id = eb.period_seq_id
    AND ed.period_seq_id = p.period_seq_id AND p.period_status = 'CURRENT'
    AND eb.bonus_amount >= 0 AND eb.person_seq_id = 3525125;
    This query gives following result
    3525125     240000     USD     INR
    3525125     0      USD     INR
    3525125     60000      USD     INR
    3525125     50000      USD     INR
    There are two distinct currency codes (USD, INR) and total amount is 350000. So I am looking for a query to give me the following result
    3525125     350000 2
    Thanks in advance

    Hi,
    Here's one way:
    WITH     original_query     AS
         SELECT  eb.person_seq_id
         ,     eb.bonus_amount
         ,     eb.currency_cd
         ,     ed.currency_cd_host
         FROM     fr_emp_bonuses         eb
         ,     fr_emp_details          ed
         ,     fr_periods          p
         WHERE      eb.person_seq_id    = ed.person_seq_id
         AND      ed.period_seq_id    = eb.period_seq_id
         AND      ed.period_seq_id    = p.period_seq_id
         AND      p.period_status         = 'CURRENT'
         AND      eb.bonus_amount     >= 0
         AND     eb.person_seq_id    = 3525125
    ,     unpivoted_data     AS
         SELECT     person_seq_id
         ,     bonus_amount
         ,     currency_cd
         FROM     original_query
        UNION ALL
            SELECT  person_seq_id
         ,     0               AS bonus_amount
         ,     currency_cd_host     AS currency_cd
         FROM     original_query
    SELECT       person_seq_id
    ,       SUM (bonus_amount)          AS total_bonus_amount
    ,       COUNT (DISTINCT currency_cd)     AS distinct_currency_cds
    FROM       unpivoted_data
    GROUP BY  person_seq_id
    ;There may be a shorter, more efficient way to get the same results, but without knowing more about your tables, I can't tell.
    The tricky thing is getting two columns (currency_cd and currencuy_cd_host in this case) counted together. You can't simply say
    COUNT (DISTINCT eb.currency_cd) +
    COUNT (DISTINCT ed.currency_code_host)That happens to get the correct result with the sample data you posted, but what if you had data like thEe following?
    currency_cd     currency_cd_host
    INR          USD
    USD          INRHere, the count of distinct currency_cds is 2, and the count of distinct currency_cd_hsots is also 2. Does that mean the grand total is 2 + 2 = 4? No, the 2 codes in one column arte the same 2 codes as in the other column. We need to get both currency_cd and currency_cd_hsot into the same column, and then do COUNT (DISTINCT ...) on that combined column. A UNION, as shown above, will certainly do that, starting with your query as you posted it. The query you posted isn't necessarily the best frist step towards this result, however, so there may be a much better approach, depending on your tables.
    Edited by: Frank Kulash on Feb 1, 2012 6:21 PM
    Here's a slightly shorter, and probably more efficient way to get the same results:
    WITH     cntr     AS
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL     <= 2
    SELECT       eb.person_seq_id
    ,       SUM (eb.bonus_amount)          AS total-amount
    ,       COUNT ( DISTINCT CASE
                        WHEN  c.n = 1
                        THEN  eb.currency_cd
                        ELSE  ed.currency_cd_host
                      END
              )               AS distinct_currency_cds
    FROM       fr_emp_bonuses    eb
    ,       fr_emp_details    ed
    ,       fr_periods          p
    ,       cntr              c
    WHERE        eb.person_seq_id  = ed.person_seq_id
    AND        ed.period_seq_id  = eb.period_seq_id
    AND        ed.period_seq_id  = p.period_seq_id
    AND        p.period_status   = 'CURRENT'
    AND        eb.bonus_amount   >= 0
    AND       eb.person_seq_i   = 3525125
    --       NOTE: no join condition involving c; we really do want a cross-join
    GROUP BY  eb.person_seq_id
    ;

  • Sum two different columns from two different tables

    Can you select and sum two different columns, from two different tables in the same sql statement?
    i.e.
    table1
    Item----OnHand_Qty
    A--------10
    A--------15
    B--------10
    B--------10
    C--------20
    table2
    Item----Trx_Qty
    A--------2
    A--------4
    A--------6
    B--------1
    B--------1
    C--------4
    I'm looking for the following results from a query
    Item----Sum(Onhand_Qty)---Sum(Trx_Qty)
    A--------25

    Like this?
    SQL> create table table1 (item,onhand_qty)
      2  as
      3  select 'A', 10 from dual union all
      4  select 'A', 15 from dual union all
      5  select 'B', 10 from dual union all
      6  select 'B', 10 from dual union all
      7  select 'C', 20 from dual union all
      8  select 'D', 30 from dual
      9  /
    Tabel is aangemaakt.
    SQL> create table table2 (item, trx_qty)
      2  as
      3  select 'A', 2 from dual union all
      4  select 'A', 4 from dual union all
      5  select 'A', 6 from dual union all
      6  select 'B', 1 from dual union all
      7  select 'B', 1 from dual union all
      8  select 'C', 4 from dual union all
      9  select 'E', 3 from dual
    10  /
    Tabel is aangemaakt.
    SQL> select nvl(t1.item,t2.item) item
      2       , t1.sum_onhand_qty
      3       , t2.sum_trx_qty
      4    from ( select item, sum(onhand_qty) sum_onhand_qty
      5             from table1
      6            group by item
      7         ) t1
      8         full outer join
      9         ( select item, sum(trx_qty) sum_trx_qty
    10             from table2
    11            group by item
    12         ) t2
    13         on (t1.item = t2.item)
    14  /
    I SUM_ONHAND_QTY SUM_TRX_QTY
    A             25          12
    B             20           2
    C             20           4
    E                          3
    D             30
    5 rijen zijn geselecteerd.Regards,
    Rob.

  • How do I get routing data from the Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application.

    I have a tableView displaying a list of contacts from a Cloud Database.  After selecting a contact, I push to a programmatically created MKMapView.  Then I display the initial region (the view) that includes the users current location (starting point) and their selected destination (end point).
    Now I want to display annotations (as described in the Location Awareness Programming Guide) that displays polylines which will represent the turn-by-turn navigation IN MY OWN APPLICATION, and not in the Map App currently used in IOS6. 
    Due to licensing and its becoming depricated in IOS 6, I do not want to get routing data from the Google Maps API.  How do I get routing data from the IOS 6 Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application?
    I checked out Stack Overflow and other forums which basically left me with the impression that this is not possible. I also checked out the TomTom iPhone Mobile SDK User Guide from the TomTom Developer Portal and am still confused.  It must be possible to retrieve routes, since the Map App can display turn-by-turn directions.  How can I retrieve turn-by-turn data that I may display as a route within my own application?

    Thanks Michael. Apologies for the slow reply I was away for a bit (holiday blitz at work and visiting family madness etc.etc.) back now, I set both options you requested to "never " and retried the CMS software with no change. 
    I do have progress of a sort though, as a test I took a separate test PC and put a clean install of Win7 on and loaded up the CMS software (it worked perfectly) and then took the version of ole32.dll off that machine and put it onto the computer I had built
    for her (using Linux) and...
    got a new error code. Darn I was so sure I had found a clever solution this time lol.
    Anyway now when the CMS fails it gives me a similar error but the offending module is "ntdll.dll" sooo... I tried taking the "working" version of ntdll.dll from the test box and moving it over (making sure to back up the existing ones
    first so I could put them back if needed) to her new PC and the PC would not boot. 
    It seems to want the original versions of a few Dynamic Link Libraries and if I could somehow give it those while not breaking Win7 it should theoretically work seeing as it no longer errors with ole32.dll. 
    ntdll.dll however seems necessary for Win7 to boot.
    So what I am wondering now is:
    Is there some way to have both versions of the DLL file in the system32 folder (bypassing the "cannot have two files with the exact same name in the same folder" thing) or rename the original DLL's something else and somehow make the CMS look for
    the new named versions so the system has the updated DLL's it needs to boot/run and the CMS has the old ones it wants to run or is there someway to have a self contained install of the CMS, say on a USB flash drive and give it it's own E:/windows/system32/needed
    dll's  path to the files it needs? 
    Willing to try any other options or settings you may have come up with as well.
    Thanks again for your reply and my apologies for not answering sooner.

  • DNG Converter filename as original date from EXIF

    Hi there,
    I like the DNG Converter, except that I would like to use the date from the EXIF information as the filename. That doesn't seem to be possible.
    Does anybody know of a(nother) way of doing this?
    Thanks!
    Regards,
    D.M.

    Under section 3 in the DNG Converter, select one of the date options from one of the popup menus.
    If you don't like that format, consider using Bridge or Lightroom to perform the renaming.

  • How to insert data from APEX form into two tables

    Hi,
    I'm running APEX 4.1 with Oracle XE 11g, having two tables CERTIFICATES and USER_FILES. Some of the (useless) fields are cut to reduce information:
    CREATE TABLE CERTIFICATES
    CERT_ID NUMBER NOT NULL ,
    CERT_OWNER NUMBER NOT NULL ,
    CERT_VENDOR NUMBER NOT NULL ,
    CERT_NAME VARCHAR2 (128) ,
    CERT_FILE NUMBER NOT NULL ,
    ) TABLESPACE CP_DATA
    LOGGING;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_PK PRIMARY KEY ( CERT_ID ) ;
    CREATE TABLE USER_FILES
    FILE_ID NUMBER NOT NULL ,
    FILENAME VARCHAR2 (128) ,
    BLOB_CONTENT BLOB ,
    MIMETYPE VARCHAR2 (32) ,
    LAST_UPDATE_DATE DATE
    ) TABLESPACE CP_FILES
    LOGGING
    LOB ( BLOB_CONTENT ) STORE AS SECUREFILE
    TABLESPACE CP_FILES
    STORAGE (
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    FREELISTS 1
    BUFFER_POOL DEFAULT
    RETENTION
    ENABLE STORAGE IN ROW
    NOCACHE
    ALTER TABLE USER_FILES
    ADD CONSTRAINT CERT_FILES_PK PRIMARY KEY ( FILE_ID ) ;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_USER_FILES_FK FOREIGN KEY
    CERT_FILE
    REFERENCES USER_FILES
    FILE_ID
    NOT DEFERRABLE
    What I'm trying to do is to allow users to fill out all the certificate data and upload a file in an APEX form. Once submitted the file should be uploaded in the USER_FILES table and all the fields along with CERT_ID, which is the foreign key pointing to the file in the USER_FILES table to be populated to the CERTIFICATES table. APEX wizard forms are based on one table and I'm unable to build form on both tables.
    That's why I've created a view (V_CERT_FILES) on both tables and using INSTEAD OF trigger to insert/update both tables. I've done this before and updating this kind of views works perfect. Here is where the problem comes, if I'm updating the view all the data is updated correctly, but if I'm inserting into the view all the fields are populated at CERTIFICATES table, but for USER_FILES only the fields FILE_ID and LAST_UPDATE_DATE are populated. The rest three regarding the LOB are missing: BLOB_CONTENT, FILENAME, MIMETYPE. There are no errors when running this from APEX, but If I try to insert into the view from SQLDeveloper, I got this error:
    ORA-22816: unsupported feature with RETURNING clause
    ORA-06512: at line 1
    As far as I know RETURNING clause in not supported in INSTEAD of triggers, although I didn't have any RETURNING clauses in my trigger (body is below).
    Now the interesting stuff, after long tracing I found why this is happening:
    First, insert is executed and the BLOB along with all its properties are uploaded to wwv_flow_file_objects$.
    Then the following insert is executed to populate all the fields except the BLOB and it's properties, rowid is RETURNED, but as we know RETURNING clause is not supported in INSTEAD OF triggers, that's why I got error:
    PARSE ERROR #1918608720:len=266 dep=3 uid=48 oct=2 lid=48 tim=1324569863593494 err=22816
    INSERT INTO "SVE". "V_CERT_FILES" ( "CERT_ID", "CERT_OWNER", "CERT_VENDOR", "CERT_NAME", "BLOB_CONTENT") VALUES (:B1 ,:B2 ,:B3 ,:B4, ,EMPTY_BLOB()) RETURNING ROWID INTO :O0
    CLOSE #1918608720:c=0,e=11,dep=3,type=0,tim=1324569863593909
    EXEC #1820672032:c=3000,e=3168,p=0,cr=2,cu=4,mis=0,r=0,dep=2,og=1,plh=0,tim=1324569863593969
    ERROR #43:err=22816 tim=1324569863593993
    CLOSE #1820672032:c=0,e=43,dep=2,type=1,tim=1324569863594167
    Next my trigger gets in action, sequences are generated, CERTIFICATES table is populated and then USER_FILES, but only the FILE_ID and LAST_UPDATE_DATE.
    Finally update is fired against my view (V_CERT_FILES), reading data from wwv_flow_files it populates BLOB_CONTENT, MIMETYPE and FILENAME fields at the specific rowid in V_CERT_FILES, the one returned from the insert at the beginning. Last, file is deleted from wwv_flow_files.
    I'm using sequences for the primary keys, this is only the body of the INSTEAD OF trigger:
    select user_files_seq.nextval into l_file_id from dual;
    select certificates_seq.nextval into l_cert_id from dual;
    insert into user_files (file_id, filename, blob_content, mimetype, last_update_date) values (l_file_id, :n.filename, :n.blob_content, :n.mimetype, sysdate);
    insert into certificates (cert_id, cert_owner, cert_vendor, cert_name, cert_file) values (l_cert_id, :n.cert_owner, :n.cert_vendor, :n.cert_name, l_file_id);
    I'm surprised that I wasn't able to find a valuable source of information regarding this problem, only MOS note about running SQLoader against view with CLOB column and INSTEAD OF trigger. The solution would be to ran it against base table, MOS ID 795956.1.
    Maybe I'm missing something and that's why I decided to share my problem here. So my question is how do you create this kind of architecture, insert into two tables with a relation between them in APEX ? I read a lot in the Internet, some advices were for creating custom form with APEX API, create a custom ARP, create two ARP or create a PL/SQL procedure for handing the DML?
    Thanks in advance.
    Regards,
    Sve

    Thank you however I was wondering if there was an example available which uses EJB and persistence.

  • How to read data from multiple files and append in columns in one file

    Hi Guys,
    I have a problem in appending data from files in different columns. I have attachement has file A and B which I am reading and not able to get data as in file Result.txt. Please comment on how can I do this
    Solved!
    Go to Solution.
    Attachments:
    Write to file.vi ‏13 KB
    A.txt.txt ‏1 KB
    B.txt.txt ‏1 KB

    You cannot append columns to an existing file. Since the data is arrange line-by-line as one long linear string in the file, you can only append rows. A new row needs to be interlaced into the original file, shifting everything else. If you want to append rows, you need to build the entire output structure in memory and then write all at once.
    (I also don't think you need to set the file positions, it will be remembered from the last write operation.)
    Unless the files are gigantic, here's what I would do:
    (Also note that some of your rows have an extra tab at the end. If this is normal, you need a little bit more code to strop out empty columns. I include cleaned up files in the attachment. I also would not call them A.txt.txt etc. A plain A.txt is probably sufficient.)
    EDIT: It seems Dennis's solution is similar )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Write to fileMOD.zip ‏6 KB
    MergeColumns.png ‏6 KB

  • Wanting data from a table without a particular column

    I need the data from a table, except the data for a particular
    column. I don't want to write the select list, as it would be
    too clumsy for a large table. Can anybody suggest a solution. I
    can certainly create a view, but I don't want that.

    Hi,
    Try this select Statement.
    set haeding off
    set feedback off
    spool file.sql
    Select 'Select ' from dual;
    Select Column_name || ',' from all_tab_columns Where table_name = 'EMPLOYEE' and Column_Name != 'DEPARTMENT_ID';
    Select '1' from dual;
    select 'From Employee;' from dual;
    Spool off
    regards,
    Ganesh R

  • Is there a way to import data from excel -when one of the columns in excel is hyperlink column?

     Is there a way to import data from excel  - so if a column is hyperlink - the whole data will move to the list (text + link of the hyperlink column)?
    keren tsur

    Hi,
    According to your description, you want to export excel which contains a hyperlink column to SharePoint list.
    Refer to the following steps:
    Open the Excel, insert/create the table. 
    Now click on any cell of table and go to the ‘Design Tools’.
    Click on the Export and then ‘Export table to SharePoint List’.
    You will see a popup where you need to provide the URL of SharePoint site, list name and description.
    Then click on next, On the next screen you will see columns with data types which are going to create in SharePoint list.
    Now click finish and wait until the operation gets finished. You will see that list gets created in SharePoint site with the records.
    Here are two links, you can use as a reference:
    http://sharepointrhapsody.com/2013/03/25/how-to-create-a-connected-excel-file-to-sharepoint-list/
    http://social.technet.microsoft.com/wiki/contents/articles/18705.sharepoint-2013-how-to-export-excel-sheet-to-sharepoint-list.aspx
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

Maybe you are looking for