BULK INSERT = Enclosing in double/single quotes

  • Hello

    First time i am trying this BULK INSERT;

    I looked at

    http://msdn.microsoft.com/en-us/library/ms188365.aspx

    http://sqlserver2000.databases.aspfaq.com/how-do-i-load-text-or-csv-file-data-into-sql-server.html

    How do i mention the oracle equivalent of fields separated by , (comma) , optionally enclosed in "?

    Thanks

  • GK:

    Begging your pardon, but your question is unclear to me. Could you give a few examples of your data and what you want your output to look like?

    I'm unclear as to whether or not by optionally enclosed in "" you mean comma-separators enclosed in quotes, or values inclosed in quotes like the following,

    "able",Smith,123,January

    baker,"Jones",456,"December"

    If your data fits the example above, you can specify to bcp that the comma is your "fieldterminator", and load your data into a worktable. Then use a query to update all columns, replacing double quotation marks with empty characters (''). Following the update, process your worktable against your primary tables.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply