DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: SQLLDR want double quotes in string

Hybrid View

  1. #1
    Join Date
    Nov 2001
    Location
    New Brunswick, NJ
    Posts
    67

    SQLLDR want double quotes in string

    Hello All,

    What is the proper way to code a control file (or my data) so that I can include a double quote with the data? I'm erroring out right now.

    Below is a sample.

    Thanks,

    P

    Control file
    ============
    load data
    infile test.dat
    REPLACE
    into table test
    FIELDS terminated by "," optionally enclosed by '"'
    (TEST_PK
    ,TEXT
    )


    Data file
    =========
    "15","If you answered "Yes," to any of the above, please provide details on a separate sheet.",

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Should be:
    Code:
    ....
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' 
    ...

  3. #3
    Join Date
    Nov 2001
    Location
    New Brunswick, NJ
    Posts
    67
    What did I miss?

    Isn't that what I already have?

    load data
    infile test.dat
    REPLACE
    into table test
    FIELDS terminated by "," optionally enclosed by '"'
    (TEST_PK
    ,TEXT
    )


    Thanks,

    P
    Last edited by mrpaulwass; 03-10-2003 at 04:13 PM.

  4. #4
    Join Date
    Nov 2001
    Location
    New Brunswick, NJ
    Posts
    67
    Last chance...

    Anyone have a different thought on this?

    Thanks.

    P


  5. #5
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492
    Instead of using:

    FIELDS terminated by "," optionally enclosed by '"'
    Try using a different terminator character (like '|') and code:

    FIELDS terminated by '|'

    And no 'quote problems.


Posting Permissions

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


Click Here to Expand Forum to Full Width