DB export table to MDB file...

Hi all,

One have idea about to export a table of database and convert to MS Access file *. MDB? *

Thank you in advance

Use sql developer (Toad, pl/sql developer,...) to export data to csv file, then import it with ms access in table required.

Tags: Database

Similar Questions

  • Export tables to flat files

    Hello

    Can I export tables to flat files (csv) using pl/sql. I mean suppose I have 2 paintings "student" and "topic" and I want to create two files student.csv and subject.csv please let me know, if I can do using pl/sql for tables at once.

    Even if I can do it for a single table, I can write a script to automate for all tables. Please let me know with your suggestions. Appreciate your help.

    Thank you

    As user sys:

    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    /
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /
    

    As myuser:

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      --
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    

    This allows the header line and the data to write into files separate if necessary.

    for example

    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    
    PL/SQL procedure successfully completed.
    

    Output.txt file contains:

    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
    

    The procedure allows for the header and the data to separate files if necessary. Just by specifying the file name "header" will put the header and the data in a single file.

    Adapt to the exit of styles and different types of data are needed.

  • export data from the table in xml files

    Hello

    This thread to get your opinion on how export data tables in a file xml containing the data and another (xsd) that contains a structure of the table.
    For example, I have a datamart with 3 dimensions and a fact table. The idea is to have an xml file with data from the fact table, a file xsd with the structure of the fact table, an xml file that contains the data of the 3 dimensions and an xsd file that contains the definition of all the 3 dimensions. So a xml file fact table, a single file xml combining all of the dimension, the fact table in the file a xsd and an xsd file combining all of the dimension.

    I never have an idea on how to do it, but I would like to have for your advise on how you would.

    Thank you in advance.

    You are more or less in the same situation as me, I guess, about the "ORA-01426 digital infinity. I tried to export through UTL_FILE, content of the relational table with 998 columns. You get very quickly in this case in these ORA-errors, even if you work with solutions CLOB, while trying to concatinate the column into a CSV string data. Oracle has the nasty habbit in some of its packages / code to "assume" intelligent solutions and converts data types implicitly temporarily while trying to concatinate these data in the column to 1 string.

    The second part in the Kingdom of PL/SQL, it is he's trying to put everything in a buffer, which has a maximum of 65 k or 32 k, so break things up. In the end I just solved it via see all as a BLOB and writing to file as such. I'm guessing that the ORA-error is related to these problems of conversion/datatype buffer / implicit in the official packages of Oracle DBMS.

    Fun here is that this table 998 column came from XML source (aka "how SOA can make things very complicated and non-performing"). I have now 2 different solutions 'write data to CSV' in my packages, I use this situation to 998 column (but no idea if ever I get this performance, for example, using table collections in this scenario will explode the PGA in this case). The only solution that would work in my case is a better physical design of the environment, but currently I wonder not, engaged, as an architect so do not have a position to impose it.

    -- ---------------------------------------------------------------------------
    -- PROCEDURE CREATE_LARGE_CSV
    -- ---------------------------------------------------------------------------
    PROCEDURE create_large_csv(
        p_sql         IN VARCHAR2 ,
        p_dir         IN VARCHAR2 ,
        p_header_file IN VARCHAR2 ,
        p_gen_header  IN BOOLEAN := FALSE,
        p_prefix      IN VARCHAR2 := NULL,
        p_delimiter   IN VARCHAR2 DEFAULT '|',
        p_dateformat  IN VARCHAR2 DEFAULT 'YYYYMMDD',
        p_data_file   IN VARCHAR2 := NULL,
        p_utl_wra     IN VARCHAR2 := 'wb')
    IS
      v_finaltxt CLOB;
      v_v_val VARCHAR2(4000);
      v_n_val NUMBER;
      v_d_val DATE;
      v_ret   NUMBER;
      c       NUMBER;
      d       NUMBER;
      col_cnt INTEGER;
      f       BOOLEAN;
      rec_tab DBMS_SQL.DESC_TAB;
      col_num NUMBER;
      v_filehandle UTL_FILE.FILE_TYPE;
      v_samefile BOOLEAN      := (NVL(p_data_file,p_header_file) = p_header_file);
      v_CRLF raw(2)           := HEXTORAW('0D0A');
      v_chunksize pls_integer := 8191 - UTL_RAW.LENGTH( v_CRLF );
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      --
      FOR j IN 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
        WHEN 1 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,4000);
        WHEN 2 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
        WHEN 12 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,4000);
        END CASE;
      END LOOP;
      -- --------------------------------------
      -- This part outputs the HEADER if needed
      -- --------------------------------------
      v_filehandle := UTL_FILE.FOPEN(upper(p_dir),p_header_file,p_utl_wra,32767);
      --
      IF p_gen_header = TRUE THEN
        FOR j        IN 1..col_cnt
        LOOP
          v_finaltxt := ltrim(v_finaltxt||p_delimiter||lower(rec_tab(j).col_name),p_delimiter);
        END LOOP;
        --
        -- Adding prefix if needed
        IF p_prefix IS NULL THEN
          UTL_FILE.PUT_LINE(v_filehandle, v_finaltxt);
        ELSE
          v_finaltxt := 'p_prefix'||p_delimiter||v_finaltxt;
          UTL_FILE.PUT_LINE(v_filehandle, v_finaltxt);
        END IF;
        --
        -- Creating creating seperate header file if requested
        IF NOT v_samefile THEN
          UTL_FILE.FCLOSE(v_filehandle);
        END IF;
      END IF;
      -- --------------------------------------
      -- This part outputs the DATA to file
      -- --------------------------------------
      IF NOT v_samefile THEN
        v_filehandle := UTL_FILE.FOPEN(upper(p_dir),p_data_file,p_utl_wra,32767);
      END IF;
      --
      d := DBMS_SQL.EXECUTE(c);
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT
      WHEN v_ret    = 0;
        v_finaltxt := NULL;
        FOR j      IN 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
          WHEN 1 THEN
            -- VARCHAR2
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            v_finaltxt := v_finaltxt || p_delimiter || v_v_val;
          WHEN 2 THEN
            -- NUMBER
            DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
            v_finaltxt := v_finaltxt || p_delimiter || TO_CHAR(v_n_val);
          WHEN 12 THEN
            -- DATE
            DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
            v_finaltxt := v_finaltxt || p_delimiter || TO_CHAR(v_d_val,p_dateformat);
          ELSE
            v_finaltxt := v_finaltxt || p_delimiter || v_v_val;
          END CASE;
        END LOOP;
        --
        v_finaltxt               := p_prefix || v_finaltxt;
        IF SUBSTR(v_finaltxt,1,1) = p_delimiter THEN
          v_finaltxt             := SUBSTR(v_finaltxt,2);
        END IF;
        --
        FOR i IN 1 .. ceil( LENGTH( v_finaltxt ) / v_chunksize )
        LOOP
          UTL_FILE.PUT_RAW( v_filehandle, utl_raw.cast_to_raw( SUBSTR( v_finaltxt, ( i - 1 ) * v_chunksize + 1, v_chunksize ) ), TRUE );
        END LOOP;
        UTL_FILE.PUT_RAW( v_filehandle, v_CRLF );
        --
      END LOOP;
      UTL_FILE.FCLOSE(v_filehandle);
      DBMS_SQL.CLOSE_CURSOR(c);
    END create_large_csv;
    
  • A pivot table can be printed or exported to a printable file

    A pivot table can be printed or exported to a printable file? How?

    See the dvt:exportPivotTableData component
    http://jdevadf.Oracle.com/ADF-richclient-demo/faces/feature/PivotTable/pivotTableExport.JSPX
    The source for this demo here:
    http://www.Oracle.com/technology/products/ADF/adffaces/11/doc/demo/adf_faces_rc_demo.html

  • 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

  • Export tables selected when running

    Hello

    We expect to write export query table in our database to oracle 11 g 2 using EXPDP. We want to include only a set of tables, in the export dump file. This series of paintings, are stored in the main table.

    So, at any time, we do export tables that are out of select table_name from master_table

    Ex: aa/aa@aa expdp tables = "select table_name from tables_to_exp '...

    Yat - der a way to achieve this?


    Thank you!

    851602 wrote:

    Still the same result...

    You cannot use the parameter TABLES in such a way. Use INCLUDE:

    expdp aa/aa@aa include="table:\" in (select table_name from tables_to_exp_owner.tables_to_exp)\""
    

    SY.

  • export table from oracle 10g with oracle 8i exp utlity

    Hello

    I export table from oracle 10g with oracle 8i exp the binaries:
    bash-2.05$ exp pin/pin file=prakash.dmp tables=prakash@APPSDB
    
    Export: Release 8.1.7.0.0 - Production on Tue Aug 4 09:58:18 2009
    
    (c) Copyright 2000 Oracle Corporation.  All rights reserved.
    
    
    Connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - 64bit Production
    Export done in UTF8 character set and UTF8 NCHAR character set
    
    About to export specified tables via Conventional Path ...
    EXP-00011: PIN.PRAKASH@APPSDB does not exist
    Export terminated successfully with warnings.
    I can't please inputs appreciated.

    axis/axis here is the user and pwd to oracle 8i
    Prakash is the name of a table in oracle 10g

    appsdb is the link of database

    Thank you

    Prakash GR

    axis/axis here is the user and pwd to oracle 8i

    Prakash is the name of a table in oracle 10g >

    To export the database 10g PRAKASH table, use the 8i export utility.

    log tables = prakash.log file = prakash.dmp exp = feedback = 100000 PRAKASH

    Who is the owner of the table? You have the TNS entry for the 10g database in your NET80 folder. If this isn't the case, then put an entry in there. Then, when you are prompted for the user name

    username:newcolsys@tns_alias/password

    HTH
    Anand

  • Export the list of files in a folder in the Explorer

    How to export a list of files that that are in an excel file or a text document? Preferably excel.

    Thank you

    Tom

    You must have the directory you want the list on your hard drive (not a network share even if a mapped drive may work?

    Files should be displayed in the format of details in the directory.

    (1) type cmd in the start menu to bring up a prompt back
    (2) use the (for example) "cd C:\Users\BobJones\Desktop\New folder" command to navigate to the folder in question
    (3) use the command "DIR > doggy.csv ' to create a file named doggy.csv in the same directory that you open directly with excel. Nothing looks much lik that it happens, but you unlike find the small file as expected.

    Good luck!

  • How can we export itno csv data file for oracle forms

    Hello

    How can we export itno csv data file for oracle forms

    For example. I have the block called A.what never the data displayed on a block, when I click on a button, displays the block data, must be exported to the csv file.

    My application is running on the unix operating system.

    Please help on this.

    First of all.  What is your version of forms (for example: 11.1.2.2.0 not 11g).  Finally, who will use the .csv file?  If it is a user on their client computer - CLIENT_TEXT_IO TEXT_IO or WebUtil are standard packages used to export data to a file of Oracle Forms.

    The amount of data to be exported?  If you export only a couple hundred lines - export of Froms will be OK.  If you export more lines than that (300 + lines) then the export will be extremely slow to your username.  Keep in mind that forms is not designed to perform data exports - there are better tools available for this...

    Craig...

  • Animate the will not export to a movie file?

    Animate the will not export to a movie file? It will only give me still image options: jpeg, tiff, etc.


    I tried to install Flash Pro CS6 (because I know that I can export to a Quicktime Movie file_), but there is no option to do so in the creative clouds?


    Why I can't download Flash Pro CS6 creative cloud?, or why is there not an option to export to Quicktime of Animate movie file?


    best regards, Graham

    In CS6, you would use an export of the video options to get a video file. In CC versions and animate, there is a dedicated video export option. Use that, it's much better than the film export CS6 method.

  • Export of transparent png files

    I am creating assets for the purposes of book for children and drew their in http://bit.ly/joc0zm on an iPad pro. While it exports png files, it does not culture to the bounds of the object, I need to animate. So I export the png and have to crop in another application. But I'm not find all the apps that export with transparency png files! Y at - it all apps iPad mobile Adobe who will import png with transparency, crop and then allow me to export it as a png with transparency? I really do not have to go to the computer for that.

    Hey there, tangofilly!

    Unfortunately, you're out of luck one finding. Option in the Adobe mobile apps in PNG export. If you take the files on the desktop for animation, perhaps cropping can happen just before the Office?

    I apologize for the inconvenience. If you want to ask. Export PNG in a specific mobile application, please press on "give us feedback" in the application and which will go to the team produced.

    Thank you!

    -Kathleen

  • How can I copy 2 pages and turn them into a new pdf document? I can highlight pages, export and then combine files into new pdf, but it's very heavy. Acrobat DC, I cannot open 2 files acrobat side by side.

    I have a 600-page adobe document. How can I copy 2 pages and turn them into a new document? I can highlight pages, export and then combine files into new pdf, but it's very heavy. Acrobat DC, I cannot open 2 files acrobat side by side. In the past, I could take two pages and copy and insert into the document opened adjacent... Thank you

    I'm not what you mean... Start by describing what tools or methods that you use to extract these pages.

    What you write in the first sentence is not true, however. In the dialogue window extract Pages, you can choose whether or not to delete the extracted pages of the original file and extract them as individual pages or not. If you UN-select both options, you will get a single file that contains the pages you have checked out, and they will not be deleted from the original file.

  • Export to Flash (.fla) file! -Media encoder does not work. Export failed!

    Hello

    A few weeks ago, I bought creative cloud and especially Flash Pro programs.

    I use a PC for Windows 8.1.

    I had just finished my project and wanted to export by clicking on file-> export-> export video. Now, a new Panel arrives and wants to know certain specific issues, as usual.

    After you click 'Export', he will now try to download this file to the Media Encoder. And that is the problem: Flash, then mentions that the file could not be imported to the Media Encoder, and at the same time the media encoder will say the same thing: "this file cannot be imported", or "this file cannot be read.

    I don't understand the media encoder cannot be not able to import a normal "FLA" - file and then put it in a .mov, .mp4 or whatever it is for Windows.

    I did not and do not want to use the quick time player, that the video would be able to play whith. And I can't imagine that the media encoder does not have Windows-compatible video formats to be does. But, as I mentioned before, it is not yet I would go that far, because he's not import the file!

    I already tried to reinstall all the programs, and each of them are also updated!

    So far I have not really found someone with this problem after doing a lot of research on the Internet!

    Thank you very much!!

    Your

    Rich

    You can open the video in any player after convert you, but adobe media encoder requiring some QuickTime plugins to work...

  • Is it possible to automate the export of my InDesign file to several different export settings with PDF files?

    OK, so not sure if this is possible, but it would be a great time for me if possible gain, so I throw it out there.

    I often work on spec sheets to work in InDesign and when I finished, I have preset PDF export settings for Print and Web. Printing has all the markings of bleed and printer, and one, web well... you get the idea.

    For now, I need to run export separately; so I do my export to a PDF print... and then I make my export to obtain a PDF optimized for Web.

    These are separate tasks, but surely there must be a script or another way to get InDesign just export the two PDF files at the same time, respecting the presets they are posted.

    How can I do this?

    Looks like it's what you're looking for:

    http://www.ID-extras.com/script-to-export-multiple-PDFs-at-once

  • InDesign file I want to simply export to a jpg file and integrate the jpg (or png) in an e-mail...

    I have an indesign file I want to simply export to a jpg file and integrate the jpg (or png) in an email... no link, just... show all copy appears fuzzy, no matter what I do... what I am doing wrong?

    I agree with you Peter.

    However, when inserting to email, certainly in the office, the format returned from any other format, that is, png or another format of JPEG file.

    I do as Peter suggests, open the PDF file in photoshop - then save to the Web but choose JPEG compression max.

    It is usually the best solution.

Maybe you are looking for

  • Page load ok under 22 worm fails on worm 28

    On the web page http://1luckydogrescue.org in the upper left corner is a link called "our dogs for Adoption.With the help of worm 22 when the user clicks on the link the page load very well. There is a built-in window that shows dogs for adoption. 28

  • A30 - 514 - power problems

    I bought this laptop in December 2004. Since last week the computer turning off suddenly when I work or sometimes after playback of the DVD for about 30 minutes. I also find that the machine heats up a lot. I use it only for 4 or more hours in the ev

  • Satellite U300 - nothing happens when SD/SDHC cards are plugged

    Got a Satellite U300 with Vista home premiumGot a year ago almost and is never used the SD card reader. Now I want to use it, but can't find how to achieve or why it does not work? Insertion of a card in the card reader does not answer at all. Is the

  • Windows Vista - cannot use the TRENDNet TBW-102UB Bluetooth device

    Hello I am facing a problem that occurs when try to connect the device Bluetooth on Satellite A135-S4637 with Windows Vista Home Premium. The Bluetooth device is a TrendNet TBW-102UB and in XP it works fine.The error message is "peripheral Bluetooth

  • How to validate for update package without an internet connection?

    I need to update my service pack 1 to 2 on a machine without an internet connection. I can download on a USB stick and transfer it to my windows machine, however, the microsoft Download Center wants to run a validation check. My machine is valid, leg