Stage tab delimited CSV file and load the data into a different table

Hi,
I pretty new to writing PL/SQL packages.
We are using Application express for our development. We get CSV files which is stored as a BLOB content in a table. I need to write a trigger that would get executed once the user the uploads the file and parse thru the Blob content and upload or stage the data in a different table.
I would like to see if there is any tutorial or article that could explain the above process with the example or sample code to do the same. Any help in this regard will be highly appreciated.

Hi,
This is slightly unusual but at the same time easy to solve. You can read through a blob using the dbms_lob package, which is one of the Oracle supplied packages. This is presumably the bit you are missing, as once you know how you read a lob the rest is programming 101.
Alternatively, you could write the lob out to a file on the server using another built in package called utl_file. This file can be parsed using an appropriately defined external table. External tables are the easiest way of reading data from flat files, including csv.
I say unusual because why are you loading a csv file into a blob? A clob is almost understandable but if you can load into a column in a table why not skip this bit and just load the data as it comes in straight into the right table?
All of what I have described is documented functionality, assuming you are on 9i or greater. But you didn't provide a version so I can't provide a link to the documentation ;)
HTH
Chris

Similar Messages

  • How can i open a DOC or TXT file and insert the data into table?

    How can i open a DOC or TXT file and insert the data into table?
    I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
    I'd like open DOC file and I'd like insert them into the table with same columns.
    Thanks.

    Use the SQL*Loader utility or the UTL_FILE package.

  • Is it possible to have 2 different output config XML files and index the data into 2 endeca apps using the same indexing component ProductCatalogSimpleIndexingAdmin

    Hi ,
    We have a catalog that defines 2 types of products (they have too many different properties), so wanted to keep them on two different MDEX engines and serve the applications requests. Here DB catalog and front end ATG application is same for both the MDEX instances.
    Is it possible to have 2 different output config XML files and index the data into 2 endeca apps using the same indexing component ProductCatalogSimpleIndexingAdmin?
    Thanks
    Dev

    Hi, also have had some problem some monthes ago - I created separete component ProductCatalogSimpleIndexingAdminSecond. After that one of my colleage gave me some advice:
    The creating separate component like ProductCatalogSimpleIndexingAdmin for the second IOC is possible way for resolving your situation. But I afraid that this way will be required creating mane duplicates for already existed components.
    In my opinion the better way is the following:
    starting from AssemblerApplicationConfiguration and ApplicationConfiguration component. It contains details for connecting between ATG and Endeca. Of course you should configure different components for different Endeca Apps.
    After that:
    Find all components that uses AssemblerApplicationConfiguration and ApplicationConfiguration. Customize these components for using one or another  *Configuration component depending on what index works. (many variants released it: the most simple global custom component with flag.)
    Then customize the existed ProductCatalogSimpleIndexingAdmin. Using one or another IOC  and setting the flag in global custom component when index started. You can add some methods into your custom ProductCatalogSimpleIndexingAdmin like:
    Execute baseline index for both IOC (one by one)
    Execute baseline for IOC 1
    Execute baseline for IOC 2.
    Note: you should be afraid about incremental (partial) index in this configuration. But resolving conflicts in incremental index should be done after full implementation these changes.
    Regards

  • Taking the data from interactive forms and load the data into SAP system?

    hi all,
    I want to know how to take the data from interactive forms and load the data into sap system?
    if u have any sample scenario, explain with that.
    thanks in advance
    Raja

    Hello,
    Check the program...
    SAPBC480_DEMO.
    Check the below threads
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88e7ea34-0501-0010-95b0-ed14cfbeb85a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bfbcd790-0201-0010-679d-e36a3c6b89fa
    Thanks
    Seshu

  • Parsing an EDI file and populating the data into database table

    Hi ,
    Please help me in parsing an edi file and getting the required columns.
    we get an EDI file from a bank. I need to parse that file and populate the db table with the required columns.
    the file is '*' delimited and every line ends with '\'.
    The record starts with 'ST*' and ends with 'SE*'.
    sample edi file is
    ISA*00*          *00*          *ZZ*043000096820   *ZZ*2156833510     *131202*0710*U*00401*000001204*0*P*>\  ignore first 2 lines                                                                                                                                                                                              
    GS*RA*043000096820*2156833510*131202*0710*1204*X*003020\                                                                                                                                                                                                                                                  
    ST*820*000041031\                                                                                                                                                                                                                                                                                     
    BPR*X*270*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\                                                                                                                                                                                                                  
    TRN*1*101036661273032\                                                                                                                                                                                                                                                                                    
    DTM*007*131202\                                                                                                                                                                                                                                                                                           
    N1*1U*BPS\                                                                                                                                                                                                                                                                             
    N1*BE*MICHAEL    DRAYTON*34*159783633\                                                                                                                                                                                                                                                                    
    N1*PE*BPS*ZZ*183383689C2 ABC\                                                                                                                                                                                                                                                          
    N1*PR*ABC  TREAS 310\                                                                                                                                                                                                                                                                                     
    SE*9*000041031\ ST*820*000041032\                                                                                                                                                                                                                                                                                         
    BPR*X*686*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\                                                                                                                                                                                                                  
    TRN*1*101036661273034\                                                                                                                                                                                                                                                                                    
    DTM*007*131202\                                                                                                                                                                                                                                                                                           
    N1*1U*BPS\                                                                                                                                                                                                                                                                             
    N1*BE*SAMIA      GRAVES*34*892909238\                                                                                                                                                                                                                                                                     
    N1*PE*BPS*ZZ*184545710C5 ABC\                                                                                                                                                                                                                                                          
    N1*PR*ABC  TREAS 310\                                                                                                                                                                                                                                                                                     
    SE*9*000041032\
    Below is the procedure I am trying to use for parsing that file. but the logic is not working. can you please help me in doing this. its very urgent requirement.
    CREATE OR REPLACE package body p1 is
    Function parse_spec(p_str varchar2) return t_str_nt is
    begin
          return regexp_replace(p_str,'\\$',null);
    end;
    procedure edi( is
    l_out_file              utl_file.file_type;
    l_lin                 varchar2(200);
    field1            number(9);
    field2                varchar2(10 byte);
    field3           varchar2(15 byte);
    field4               varchar2(15 byte);
    field5              varchar2(20 byte);
    field6             varchar2(20 byte);
    field7              varchar2(20 byte);
    field8                  varchar2(9 byte);
    field9              varchar2(15 byte);
    field10             varchar2(5 byte);
    l_item_nt             t_str_nt:=t_str_nt();
    begin
       l_out_file  := utl_file.fopen (file_path, file_name, 'r');
       IF utl_file.is_open(l_out_file) THEN
        LOOP
          BEGIN
           l_item_nt:= utl_file.get_line(l_out_file, l_lin);
            IF l_item_nt IS NULL THEN
              raise no_data_found;
            Else
              for k in 1..l_item_nt.count loop
                  case
                   when l_item_nt(k) like 'ST*%' then
                           field1:= ltrim(regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3),0);
                   when l_item_nt(k) like 'BPR*X*%' then
                           field2 := regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3);
                    when l_item_nt(k) like 'TRN*1*%' then
                             field3:= regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3);
                    when l_item_nt(k) like 'DTM*007*%' then
                            field4:= regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3);
                    when l_item_nt(k) like '%*BE*%' then
                            field5 := regexp_substr(regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3),'[^ ]+', 1, 1);
                            field6 := regexp_substr(regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3),'[^ ]+', 1, 1);
                             field7  := regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,5);
                    when l_item_nt(k) like '%*PE*%*ZZ*%' then
                            field8:= regexp_substr(regexp_substr(parse_spec(line),'[^*]+',1,5),'[^ ]+',1,1)
                            field9 := regexp_substr(regexp_substr(parse_spec(line),'[^*]+',1,5),'[^ ]+',1,2);
                     when l_item_nt(k) like 'SE*%' then
                                                         insert into t1(field1,field2,field3,field5,field6,field7,field8,field9)
                                --  values(field1,field2,field3,field5,field6,field7,field8,field9);
                     else
                            dbms_output.put_line ('end of line');
                         end case;
                end loop;
            end if;
    end loop;
                         utl_file.fclose(l_out_file);
    exception
       when no_data_found then
                   dbms_output.put_line('No data found');
       end;

    I would not use regular expressions for parsing as it is CPU intensive - and standard string processing suffices.
    I would break the EDI up into lines. I would tokenise each line. I then have 2d array that can be referenced to find a specific field. E.g. line x and token y is field abc.
    Basic approach:
    SQL> create or replace type TStrings as table of varchar2(4000);
      2  /
    Type created.
    SQL> -- create a parser that tokenises a string
    SQL> create or replace function Tokenise(
      2          csvLine varchar2,
      3          separator varchar2 default ',',
      4          enclosedBy varchar2 default null
      5  ) return TStrings is
      6          strList         TStrings;
      7          str             varchar2(32767);
      8          i               integer;
      9          l               integer;
    10          enclose1        integer;
    11          enclose2        integer;
    12          encloseStr      varchar2(4000);
    13          replaceStr      varchar2(4000);
    14
    15          procedure AddString( line varchar2 ) is
    16          begin
    17                  strList.Extend(1);
    18                  strList( strList.Count ) := Replace( line, CHR(0), separator );
    19          end;
    20
    21  begin
    22          strList := new TStrings();
    23
    24          str := csvLine;
    25          loop
    26                  if enclosedBy is not null then
    27                          -- find the ennclosed text, if any
    28                          enclose1 := InStr( str, enclosedBy, 1 );
    29                          enclose2 := InStr( str, enclosedBy, 2 );
    30
    31                          if (enclose1 > 0) and (enclose2 > 0) and (enclose2 > enclose1) then
    32                                  -- extract the enclosed string
    33                                  encloseStr := SubStr( str, enclose1, enclose2-enclose1+1 );
    34                                  -- replace the separator char's with zero char's
    35                                  replaceStr := Replace( encloseStr, separator, CHR(0) );
    36                                  -- and remove the enclosed quotes
    37                                  replaceStr := Replace( replaceStr, enclosedBy );
    38                                  -- change the enclosed string in the big string to the replacement string
    39                                  str := Replace( str, encloseStr, replaceStr );
    40                          end if;
    41                  end if;
    42
    43                  l := Length( str );
    44                  i := InStr( str, separator );
    45
    46                  if i = 0 then
    47                          AddString( str );
    48                  else
    49                          AddString( SubStr( str, 1, i-1 ) );
    50                          str := SubStr( str, i+1 );
    51                  end if;
    52
    53                  -- if the separator was on the last char of the line, there is
    54                  -- a trailing null column which we need to add manually
    55                  if i = l then
    56                          AddString( null );
    57                  end if;
    58
    59                  exit when str is NULL;
    60                  exit when i = 0;
    61          end loop;
    62
    63          return( strList );
    64  end;
    65  /
    Function created.
    SQL>
    SQL>
    SQL> declare
      2          ediDoc  varchar2(32767) :=
      3  'ISA*00*          *00*          *ZZ*043000096820   *ZZ*2156833510     *131202*0710*U*00401*000001204*0*P*>\GS*RA*043000096820*2156833510*131202*0710*1204*X*003020\ST*820*000041031\BPR*X*270*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\TRN*1*101036661273032\DTM*007*131202\N1*1U*BPS\N1*BE*MICHAEL      DRAYTON*34*159783633\N1*PE*BPS*ZZ*183383689C2 ABC\N1*PR*ABC  TREAS 310\SE*9*000041031\ST*820*000041032\BPR*X*686*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\TRN*1*101036661273034\DTM*007*131202\N1*1U*BPS\N1*BE*SAMIA        GRAVES*34*892909238\N1*PE*BPS*ZZ*184545710C5 ABC\N1*PR*ABC  TREAS 310\SE*9*000041032\';
      4
      5          lines   TStrings;
      6          tokens  TStrings;
      7  begin
      8          -- split EDI string into lines
      9          lines := Tokenise( ediDoc, '\' );
    10
    11          -- process line and extract fields
    12          for i in 3..lines.Count loop
    13                  dbms_output.put_line( '***********************' ) ;
    14                  dbms_output.put_line( 'line=['||lines(i)||']' );
    15                  tokens := Tokenise( lines(i), '*' );
    16
    17                  for j in 1..tokens.Count loop
    18                          dbms_output.put_line( to_char(j,'00')||'='||tokens(j) );
    19                  end loop;
    20          end loop;
    21  end;
    22  /
    line=[ST*820*000041031]
    01=ST
    02=820
    03=000041031
    line=[BPR*X*270*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202]
    01=BPR
    02=X
    03=270
    04=C
    05=ACH
    06=PPD
    07=01
    08=101036669
    09=
    10=
    11=9101036669
    12=
    13=01
    14=031000053
    15=DA
    16=00000008606086714
    17=131202
    line=[TRN*1*101036661273032]
    01=TRN
    02=1
    03=101036661273032
    <snipped>

  • (Urgent help needed) how to read txt file and store the data into 2D-array?

    Hi, I have a GUI which allow to choose file from the file chooser, and when "Read file" button is pressed, I want to show the array data into the textarea.
    The sample data is like this followed:
    -0.0007     -0.0061     0.0006
    -0.0002     0.0203     0.0066
    0     0.2317     0.008
    0.0017     0.5957     0.0008
    0.0024     1.071     0.0029
    0.0439     1.4873     -0.0003
    I want my program to scan through and store these data into 2D array.
    However for some reason, my source code issues errors, and I don't know what's wrong with it, seems to have a problem in StringTokenizer though. Can anybody help me?
    Thanks in advance.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.StringTokenizer;
    public class FileReduction1 extends JFrame implements ActionListener{
    // GUI features
    private BufferedReader fileInput;
    private JTextArea textArea;
    private JButton openButton, readButton,processButton,saveButton;
    private JTextField textfield;
    private JPanel pnlfile;
    private JPanel buttonpnl;
    private JPanel buttonbar;
    // Other fields
    private File fileName;
    private String[][] data;
    private int numLines;
    public FileReduction1(String s) {
    super(s);
    // Content pane
         Container cp = getContentPane();
         cp.setLayout(new BorderLayout());     
    // Open button Panel
    pnlfile=new JPanel(new BorderLayout());
         textfield=new JTextField();
         openButton = new JButton("Open File");
    openButton.addActionListener(this);
    pnlfile.add(openButton,BorderLayout.WEST);
         pnlfile.add(textfield,BorderLayout.CENTER);
         readButton = new JButton("Read File");
    readButton.addActionListener(this);
         readButton.setEnabled(false);
    pnlfile.add(readButton,BorderLayout.EAST);
         cp.add(pnlfile, BorderLayout.NORTH);
         // Text area     
         textArea = new JTextArea(10, 100);
    cp.add(new JScrollPane(textArea),BorderLayout.CENTER);
    processButton = new JButton("Process");
    //processButton.addActionListener(this);
    saveButton=new JButton("Save into");
    //saveButton.addActionListener(this);
    buttonbar=new JPanel(new FlowLayout(FlowLayout.RIGHT));
    buttonpnl=new JPanel(new GridLayout(1,0));
    buttonpnl.add(processButton);
    buttonpnl.add(saveButton);
    buttonbar.add(buttonpnl);
    cp.add(buttonbar,BorderLayout.SOUTH);
    /* ACTION PERFORMED */
    public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("Open File")) getFileName();
         if (event.getActionCommand().equals("Read File")) readFile();
    /* OPEN THE FILE */
    private void getFileName() {
    // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
    if (result == JFileChooser.APPROVE_OPTION)
         fileName = fileChooser.getSelectedFile();
    textfield.setText(fileName.getName());
         if (checkFileName()) {
         openButton.setEnabled(false);
         readButton.setEnabled(true);
         // Obtain selected file
    /* READ FILE */
    private void readFile() {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines();
         data = new String[numLines][];
         // Read file
         readTheFile();
         // Output to text area     
         textArea.setText(data[0][0] + "\n");
         for(int index=0;index < data.length;index++)
    for(int j=1;j<data[index].length;j++)
    textArea.append(data[index][j] + "\n");
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines() {
    int counter = 0;
         // Open the file
         openFile();
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile();
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* READ FILE */
    private void readTheFile() {
    // Open the file
    int row=0;
    int col=0;
         openFile();
    System.out.println("Read the file");     
         // Loop through file incrementing counter
         try {
    String line = fileInput.readLine();
         while (line != null)
    StringTokenizer st=new StringTokenizer(line);
    while(st.hasMoreTokens())
    data[row][col]=st.nextToken();
    System.out.println(data[row][col]);
    col++;
    row++;
    closeFile();
    catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName() {
         if (fileName.exists()) {
         if (fileName.canRead()) {
              if (fileName.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* FILE HANDLING UTILITIES */
    /* OPEN FILE */
    private void openFile() {
         try {
         // Open file
         FileReader file = new FileReader(fileName);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File opened");
    /* CLOSE FILE */
    private void closeFile() {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    /* MAIN METHOD */
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException {
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Java.lang.NullpointException
    at FileReductoin1.readTheFile <FileReduction1.java :172>
    at FileReductoin1.readFile <FileReduction1.java :110>
    at FileReductoin1.actionPerformed <FileReduction1.java :71>
    .

    1) Next time use the CODE tags. this is way too much unreadable crap.
    2) The problem is your String[][] data.... the only place I see you do anything approching initializing it is
    data = new String[numLines][];I think you want to do this..
    data = new String[numLines][3];anyway that's why it's blowing up on the line
    data[row][col]=st.nextToken();

  • How to read a table and transfer the data into an internal table?

    Hello,
    I try to read all the data from a table (all attribute values from a node) and to write these data into an internal table. Any idea how to do this?
    Thanks for any help.

    Hi,
    Check this code.
    Here i creates context one node i.e  flights and attributes are from SFLIGHT table.
    DATA: lo_nd_flights TYPE REF TO if_wd_context_node,
            lo_el_flights TYPE REF TO if_wd_context_element,
            ls_flights TYPE if_main=>element_flights,
            it_flights type if_main=>elements_flights.
    navigate from <CONTEXT> to <FLIGHTS> via lead selection
      lo_nd_flights = wd_context->get_child_node( 'FLIGHTS' ).
    CALL METHOD LO_ND_FLIGHTS->GET_STATIC_ATTRIBUTES_TABLE
      IMPORTING
        TABLE  = it_flights.
    now the table data will be in internal table it_flights.

  • Read csv file and insert the data to a list in sharePoint

    Hi everyone,
    i wrote a code that reads from a csv file all his data but i need also to insert all the data to a new list in sharePoint.
     how can i do this?
    plus, i need to read from the csv file once a day in specific hour. how can i do this? thank you so much!!

    Did you look at the example I posted above?
    ClientContext in CSOM will allow you to get a handle on the SharePoint objects;
    http://msdn.microsoft.com/en-us/library/office/ee539976(v=office.14).aspx
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • Want to Read the a txt file and put the data into the table colums.

    I have a text file in which data is piped separated and I want to put the data in the table column.
    Eg.
    Text File Column
    First_name|Last_name|address|phone_number
    Database table:
    first_name ,last_name,address,phone_number
    It's very urgent.
    Thanks For your help in advance.
    Himanshu

    Use sqlldr or external file.
    See http://download.oracle.com/docs/cd/E11882_01/server.112/e10701/part_ldr.htm#i436326 for SQL Loader.
    See http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tables013.htm#ADMIN11705 for External table.

  • Read the file and write the data into string or int

    Ok, here's another rookie question.
    I got to read the line from the file and store it in the memory as string or integer.
    I wrote this code:
    File inputFile = new File("c:/xxx.yyy");
    String outputString = new String();
    FileReader c1 = new FileReader(inputFile);
    StringWriter d1 = new StringWriter(outputString);
    int data;
             while((data = c1.read()) != -1)
                 d1.write(data);
                 System.out.println(data);
             c1.close();
             d1.close();This is how I see it, but it cannot be even compiled because there is no such thing as StringWriter(String) wich I find completely irrational. So tell me, am I retarded or what? No, but seriosly, please help the newbie to understand these streams, am I supposed to use some kind of buffer? Any help appreciated.

    A String is an immutable. You cannot update a String.
    A new String() is basically the same as an empty String ""
    An empty StringWriter can be created with new StringWriter().
    If you use a BufferedReader you can call readLine().
    BufferedReader in = new BufferedReader(new FileReader(filename));
    String line;
    while((line = in.readLine()) != null) {
      System.out.println(line);
    }

  • How do I join two tables in the same database and load the result into a destination table in a SSIS package

    Hi,
    I have a query that joins two tables in the same database, the result needs to be loaded in a destination DB table.  How do I do this in SSIS package?
    thank you !
    Thank You Warmest Fanny Pied

    Please take a look at these links related to your query.
    http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers
    http://stackoverflow.com/questions/7037228/joining-two-tables-together-in-one-database

  • Connecting to SQl server ( MS acess front end) and pull the data into BI

    Dear all,
    i need to extract the data from SQl server ( MS acess front end) and pull the data into BI .
    i need to know what are the steps need to follow on this..
    can any one help me on this...!
    Thanks,
    Siva

    Hi,
    1. login to sql server u2013 with ur server credentials  and connect.
    2. select ur sql for ex: sap bw
    3. Right click u2013 sapbw - task - export data  From sql to excel I m exporting So give sql details 
    4. Destination u2013 select excel.. and browse where u want to save the fileu2026
    5. give next
    6. select from which table u want to export
    7. click on  next
    8. click on finish
    9. close
    10. go to desktop and open the xyz.xls file
    11. not make it as csv file and load the data to BI as a flat file
    Hope it will help you.
    Regards,

  • How can i read the text files and buffer the data in Vector?

    hi. I have been running into this problem for days, but with no luck and losing right direction.
    The problem is : I am trying to read a text file and buffer the data into a
    Queue for each user.
    the sample text file is as below:( 1st column is timestamp, 2nd is user_id, 3rd is packet_id, 4th is packet_seqno, 5th is packet_size)
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512
    17 8 2 18 512
    18 9 2 19 512
    19 10 2 20 512
    20 1 3 21 512
    21 2 3 22 512
    22 3 3 23 512
    23 4 3 24 512
    24 5 3 25 512
    25 6 3 26 512
    26 7 3 27 512
    27 8 3 28 512
    28 9 3 29 512
    29 10 3 30 512
    30 1 4 31 512
    31 2 4 32 512
    32 3 4 33 512
    33 4 4 34 512
    34 5 4 35 512
    35 6 4 36 512
    36 7 4 37 512
    37 8 4 38 512
    38 9 4 39 512
    39 10 4 40 512
    40 1 5 41 512
    41 2 5 42 512
    42 3 5 43 512
    43 4 5 44 512
    44 5 5 45 512
    45 6 5 46 512
    46 7 5 47 512
    47 8 5 48 512
    48 9 5 49 512
    49 10 5 50 512
    50 1 6 51 512
    51 2 6 52 512
    52 3 6 53 512
    53 4 6 54 512
    54 5 6 55 512
    55 6 6 56 512
    56 7 6 57 512
    57 8 6 58 512
    58 9 6 59 512
    59 10 6 60 512
    60 1 7 61 512
    61 2 7 62 512
    62 3 7 63 512
    63 4 7 64 512
    64 5 7 65 512
    65 6 7 66 512
    66 7 7 67 512
    67 8 7 68 512
    68 9 7 69 512
    69 10 7 70 512
    70 1 8 71 512
    71 2 8 72 512
    What I wanna do is to read all the data above and buffer them in a queue for each user( there are only 10 users in total).
    I already created a class called Class packet:
    public class packet {
        private int timestamp;
        private int user_id;
        private int packet_id;
        private int packet_seqno;
        private int packet_size;
        /** Creates a new instance of packet */
        public packet(int timestamp,int user_id, int packet_id,int packet_seqno, int packet_size)
            this.timestamp = timestamp;
            this.user_id=user_id;
            this.packet_id=packet_id;
            this.packet_seqno=packet_seqno;
            this.packet_size=packet_size;
    }then I wanna to create another Class called Class user which I can create a queue for each user (10 users in total) to store type packet information. the queue for each user will be in the order by timestamp.
    any idea and sample code will be appreciated.

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • Loading a CSV file and accessing the variables

    Hi guys,
    I'm new to AS3 and dealt with AS2 before (just getting the grasp when the change it).
    Is it possible in AS3 to load an excel .csv file into Flash using the URLLoader (or ???) and the data as variables?
    I can get the .csv to load and trace the values (cell1,cell2,cell3....) but I'm not sure how to collect the data and place it into variables.
    Can I just create an array and access it like so.... myArray[0], myArray[1]? If so, I'm not sure why it's not working.
    I must be on the completely wrong path. Here's what I have so far....
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, dataLoaded);
    var request:URLRequest = new URLRequest("population.csv");
    loader.load(request);
    function dataLoaded(evt:Event):void {
        var myData:Array = new Array(loader.data);
        trace(myData[i]);
    Thanks for any help,
    Sky

    just load your csv file and use the flash string methods to allocate those values to an array:
    var myDate:Array = loader.data.split(",");

  • Loop through a csv file and return the number of rows in it?

    What would be simplest way to loop through a csv file and
    return the number of rows in it?
    <cffile action="read" file="#filename#" output="#csvstr#"
    >
    <LOOP THROUGH AND COUNT ROWS>

    ListLen(). Use chr(13) as your delimiter

Maybe you are looking for

  • Directory structure & applications

    It was of my knowledge that after installing windows 7 SP1 in a new stand alone laptop, only the system32 and system were created under windows directory... what is the purpose of a sysWOW64 directory under windows? I am not able to delete or rename

  • Should I save the Project Data in iMovie or iDVD??

    Hello, After creating an iMovie and an iDVD project, I'm interested in saving the digital info in case someday I want to edit it. WHat's the difference in saving an iMovie project vs. an iDVD project archive? Should i save both?

  • Canon 5D mark II firmware 1.0.7 OK in LR 2.2?

    Can anyone confirm that RAW files created by this firmware behave the same in LR 2.2 as RAW files from previous firmware? It's necessary to update Canon's apps in order for sRAW files to display properly. (Without the update, sRAW files may have a co

  • MBP whine, 10.4.7, and the mirror widget fix

    I am wondering about the 10.4.7 combo update for my MacBook Pro. It weighs in at 218 MB's, and as far as I can tell (from these forums) it contains the "keyboard update." My MacBook Pro is running 10.4.5, and the mirror widget "fix" fixes the whine.

  • Using TTF Fonts in ROME

    Hello, i've been using Rome for several months now (meaning since almost the first days of the prerelease) and i'm pretty satisfied. I use ROME for all my graphics i have to create for my work. I even do my presentations with ROME. But now i've stumb