844-NOGALIS (844-664-2547)
Nogalis, Inc.
  • Link to Facebook
  • Link to X
  • Link to LinkedIn
  • Link to Mail
  • Company
    • News, Events and Articles
    • About Us
  • Products
    • Infor Lawson Data Archive
    • PeopleSoft Data Archive
    • Oracle Data Archive
  • Services
    • Infor Lawson Support
    • Infor Lawson / CloudSuite Consulting
  • Education & Training
  • Support
  • Contact Us
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

Using Bulk Insert for interfaces

Articles, Frontpage Article, News

Bulk Insert (delivered with SQL Server) is a great way to quickly import data into SQL Server tables.  The input file format does not need to match the column definition on the table.  You can use import file definitions for that.

To create an import file definition, first go to the SQL server where the database table resides.  Run the command bcp <database>.<owner>.<tablename> format nul -c -f <local path>\<filename>.fmt -t, -T

(For clarity, best practice is to name the file the same as the table name).

Edit the format file (if needed) in a text editor to accommodate for any differences between the input file and the database table.  The first column is the order of fields in the input file.  The 5th column provides the delimiter between fields.  The 6th column maps to the appropriate field in the database table.  The number at the top (below the version “10.0”) describes how many fields are in the input file.  If you are not using all the fields from the input file, you must adjust this number accordingly.  If you say it is looking for 20 fields, it will be looking for 20 fields and will error if 20 fields aren’t found.

CSV files are a little tricky, as you need to accommodate for double quotes.

Note that the files must be accessible by a local path on the SQL Server machine.

The Bulk Insert command is:

BULK INSERT <table name>

FROM ‘<full path to import file>

WITH (FORMATFILE = ‘<full path to format file>’, FIRSTROW = <first row of data in the import file>)

 

Retiring Lawson, PeopleSoft, or Oracle? APIX archives the entire application — every table, every year, attachments and security included — into your own AWS account in about 30 days, so you can decommission the legacy system and keep full access to the history.

See how the APIX ERP archive works →

04/26/2022
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://www.nogalis.com/wp-content/uploads/2022/04/Using-Bulk-Insert-for-interfaces.jpg 470 470 Angeli Menta https://www.nogalis.com/wp-content/uploads/2013/04/logo-with-slogan-good.png Angeli Menta2022-04-26 07:56:152022-04-22 09:27:29Using Bulk Insert for interfaces

LEGACY ERP DATA ARCHIVE SOLUTION



Discover how our clients are leveraging AWS services to archive their Legacy ERP data and provide ubiquitous access to users via a light-weight, secure, and read-only web interface. Secure, Fast, Reliable, and Cost Effective. That is the promise of APIX. Follow the link below to find out more and book a discovery call with our data archive specialist.

BOOK DEMO

© Copyright - Nogalis, Inc. 2026
  • Legal
  • Privacy
  • Contact Us
Link to: Infor Strengthens its Position in the Czech Republic’s Manufacturing Sector Link to: Infor Strengthens its Position in the Czech Republic’s Manufacturing Sector Infor Strengthens its Position in the Czech Republic’s Manufacturing Sect... Link to: Syapse Partners with Infor to Revolutionize Cancer Care Link to: Syapse Partners with Infor to Revolutionize Cancer Care Syapse Partners with Infor to Revolutionize Cancer Care
Scroll to top Scroll to top Scroll to top