DJ's software

Wednesday, March 21, 2018

Bulk loading data to SQL server

Source: tab-separated file
Destination: table with the same structure as the file
Command:
bcp <table> in <file> -c -S <server> -U <user>

Other options:
-t : column separator (tab is the default)
-r : row separator (default: newline)
-f : format file - can be used to import files that do not match the list of columns in DB table
Posted by Daniel at 11:39 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

Daniel
View my complete profile

Blog Archive

  • ►  2025 (1)
    • ►  April (1)
  • ►  2024 (5)
    • ►  August (5)
  • ►  2021 (3)
    • ►  December (3)
  • ►  2019 (1)
    • ►  April (1)
  • ▼  2018 (7)
    • ►  October (1)
    • ►  September (3)
    • ►  July (1)
    • ►  June (1)
    • ▼  March (1)
      • Bulk loading data to SQL server
  • ►  2017 (5)
    • ►  November (1)
    • ►  July (2)
    • ►  April (2)
  • ►  2016 (10)
    • ►  December (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
  • ►  2015 (14)
    • ►  December (4)
    • ►  November (2)
    • ►  October (1)
    • ►  September (5)
    • ►  August (2)
Simple theme. Powered by Blogger.