Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 600729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:38:14+00:00 2026-05-13T16:38:14+00:00

Using the table structure below how would I create a bcp bulk insert that

  • 0

Using the table structure below how would I create a bcp bulk insert that would handle the XML data. It is important that this is run from command line.

CREATE TABLE [dbo].[MyTable](
[Id] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[MyXmlField] [xml] NULL

Thanks in advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:38:15+00:00Added an answer on May 13, 2026 at 4:38 pm

    The basic syntax for using bcp is:

    bcp <table_name> <direction> <file_name> <options> 
    

    Where the arguments take the following values:

    • table_name is the fully qualified
      name of the table. For example, you
      might use inventory.dbo.fruits to
      insert records into the fruits table,
      owned by the database owner, in the
      inventory database.
    • direction indicates whether you want
      to import (“in” direction) or export
      (“out” direction) data.
    • file_name is the full path to the
      file. For example, you could import
      the file C:\fruit\inventory.txt.
    • options allow you to specify
      parameters for the bulk operation.
      For example, you can specify the
      maximum number of errors allowed with
      the –m option. You may also use the
      –x option to specify an XML file
      format. Consult Microsoft’s bcp
      documentation for a full list.

    Will need more info to know what switches to use, but it should be somehting like

    bcp database.dbo.MyTable in "C:\folder\xmlfile.xml" -c -T
    

    -c Performs the operation using a character data type.
    -T Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security.

    Also here is Microsoft’s bcp Utility which should help you with knowing what switches to use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this table structure and would like to map it using Fluent Hibernate
I'm using Hibernate 3.3.1 and am following along in modelling this sample table structure
Setup: Contact database using 4 tables Contacts Cities States Zips Structure: CREATE TABLE `contacts`
I'm using a particular database table like a Set data structure, i.e., you can
I have a table that contains some data given below. It uses a tree
I'm using SQL Server 2008. I have a database table that looks like this
I have a database table that has a structure like the one shown below:
Assume that I have a table structure like seen below location|name ------------- NY|john London|neil
Let us say that I have a table structured like this(using SQL server): empID
I am using a MySQL table called login with the following structure: loginid, username,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.