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 7899225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:38:40+00:00 2026-06-03T08:38:40+00:00

I have a huge bulk insert that causes errors: DECLARE @row_terminator CHAR; SET @row_terminator

  • 0

I have a huge bulk insert that causes errors:

DECLARE @row_terminator CHAR;
SET @row_terminator = CHAR(10); -- or char(10)

DECLARE @stmt NVARCHAR(2000);

SET @stmt = '
  BULK INSERT accn_billed_procedures
   FROM ''F:\2011-Dec\accn_billed_procedures_201112062112.txt.gz''
   WITH 
      (
        firstrow=2,
FIELDTERMINATOR = ''|''  ,
ROWS_PER_BATCH=10000
   ,ROWTERMINATOR='''+@row_terminator+'''
   )'
exec sp_executesql @stmt;
SET @stmt = '
  BULK INSERT accn_billed_procedures
   FROM ''F:\2011-Dec\accn_billed_procedures_201112072112.txt.gz''
   WITH 
      (
        firstrow=2,
FIELDTERMINATOR = ''|''  ,
ROWS_PER_BATCH=10000
   ,ROWTERMINATOR='''+@row_terminator+'''
   )'
exec sp_executesql @stmt;
SET @stmt = '
  BULK INSERT accn_billed_procedures
   FROM ''F:\2011-Dec\accn_billed_procedures_201112082112.txt.gz''
   WITH 
      (
        firstrow=2,
FIELDTERMINATOR = ''|''  ,
ROWS_PER_BATCH=10000
   ,ROWTERMINATOR='''+@row_terminator+'''
   )'
exec sp_executesql @stmt;
SET @stmt = '
  BULK INSERT accn_billed_procedures
   FROM ''F:\2011-Dec\accn_billed_procedures_201112092112.txt.gz''
   WITH 
      (
        firstrow=2,
FIELDTERMINATOR = ''|''  ,
ROWS_PER_BATCH=10000
   ,ROWTERMINATOR='''+@row_terminator+'''
   )'
exec sp_executesql @stmt;
SET @stmt = '
  BULK INSERT accn_billed_procedures
   FROM ''F:\2011-Dec\accn_billed_procedures_201112102112.txt.gz''
   WITH 
      (
        firstrow=2,
FIELDTERMINATOR = ''|''  ,
ROWS_PER_BATCH=10000
   ,ROWTERMINATOR='''+@row_terminator+'''
   )'
exec sp_executesql @stmt;

I would like to know all the errors (or at least a lot of the errors) that are cause.

it doesnt matter to me if it will require me to run everything in order to get the list of errors.

I just want to whether it is possible to show all errors that a sql statement will generate in sql server 2008?

  • 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-06-03T08:38:41+00:00Added an answer on June 3, 2026 at 8:38 am

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

    BEGIN TRY
        -- Table does not exist; object name resolution
        -- error not caught.
        SELECT * FROM NonexistentTable;
    END TRY
    BEGIN CATCH
        SELECT 
            ERROR_NUMBER() AS ErrorNumber
            ,ERROR_MESSAGE() AS ErrorMessage;
    END CATCH
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have huge record set on AIX box that we send over network to
I have a huge IQueryable that I want to export directly to Excel for
i have a huge sql query that is attached to the rowsource of a
I have huge dictionaries that I manipulate. More than 10 Million words are hashed.
i have huge project that contains around 200 jars, when i prepare release maven
i have huge data in xlsx format and i want to dump that data
I have some functions that have huge inputs (some of them has 28 etc),
I have huge 1 GB log file. As I know, it shows errors in
I have a requirement wherein I have huge set of information in a NSArray
I have huge class that I need to build stub for. To give you

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.