Professional Web Applications Themes

SQL Bulk Loader - Coldfusion Database Access

How do I trigger the ORACLE 10g Bulk Loader from within CF? I tried with the following code but am told it is an invalid SQL statement. thanks! <cfquery name="qCatalogImport" datasource="ACS"> LOAD DATA INFILE #DateFileName# INTO TABLE PARTS_IMPORT FIELDS TERMINATED BY '|' (PART_NUM,LIST_PRICE,DESCRIPTION CHAR(750),DISCOUNT_CODE,Mfr_ID,ISREMAN) </cfquery>...

  1. #1

    Default SQL Bulk Loader

    How do I trigger the ORACLE 10g Bulk Loader from within CF? I tried with the
    following code but am told it is an invalid SQL statement.

    thanks!

    <cfquery name="qCatalogImport" datasource="ACS">
    LOAD DATA
    INFILE #DateFileName#
    INTO TABLE PARTS_IMPORT
    FIELDS TERMINATED BY '|'
    (PART_NUM,LIST_PRICE,DESCRIPTION CHAR(750),DISCOUNT_CODE,Mfr_ID,ISREMAN)
    </cfquery>

    acsdirect Guest

  2. #2

    Default Re: SQL Bulk Loader

    Your statement isn't actually valid SQL, as it appears to be the control
    parameter, of contents of a CONTROL file, that you would reference when
    executing the SQL*Loader (sqlldr).

    I've never tried this, but you might experiment with putting this into a
    PL/SQL stored procedure using dynamic SQL (NDS).

    From Oracle doentation:

    <i>When you invoke SQL*Loader, you can specify certain parameters to establish
    session characteristics. Parameters can be entered in any order, optionally
    separated by commas. You specify values for parameters, or in some cases, you
    can accept the default without entering a value.

    For example:

    SQLLDR CONTROL=foo.ctl, LOG=bar.log, BAD=baz.bad, DATA=etc.dat
    USERID=scott/tiger, ERRORS=999, LOAD=2000, DISCARD=toss.dis,
    DISCARDMAX=5

    The command to invoke SQL*Loader is operating system-dependent. </i>

    Phil

    paross1 Guest

  3. #3

    Default Re: SQL Bulk Loader

    thanks alot phil
    acsdirect Guest

Similar Threads

  1. Question bulk emails
    By geoff0000 in forum Macromedia ColdFusion
    Replies: 1
    Last Post: August 4th, 10:26 PM
  2. Bulk eMailing
    By Whizzzper in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: December 4th, 09:23 AM
  3. Best CF bulk email tool
    By Petro_ in forum Macromedia ColdFusion
    Replies: 4
    Last Post: March 29th, 12:30 PM
  4. bulk loading
    By John Miller in forum Photography
    Replies: 13
    Last Post: July 16th, 09:18 PM
  5. too many rows by bulk fetch
    By Frederic Mockel in forum IBM DB2
    Replies: 0
    Last Post: July 15th, 07:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139