Re: Failed to load all the records if any one of the records is in



Normally, operations such as this are best done by first loading into a
'Staging' table, them checking that data for abnormalities and correcting it
if possible, separating out the failures, and then inserting only the
'cleansed' data into the production tables.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"Veeru" <Veeru@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:780BD136-11F9-4F7E-BDE0-CF35DA64CD26@xxxxxxxxxxxxxxxx
Hi Erland Sommarskog

Lets assume that Customer_type is of length 4 in the database table.
If we try to load the records having the customer_type more than 4
charecters, we get an error, at the same time remaining records in the
data
file are valid but these are not loading into database.

My intensition is to load all the valid records into the table and reject
all invalid records. My data file contains combination of valid and
invalid
records.

Can you suggest me any solution.

Regards
Veeru

"Erland Sommarskog" wrote:

Veeru (Veeru@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
I am trying to load the 30 records into the database table. I have
created one Format File and one .sql file to load the data. I observed
one problem during loading the data into table, if there is any problem
in the first record of my 30 records, the sqlcmd is rejecting the
entire
datafile (30 records are in this file) instead of rejecting that record
and going to load the next record.

What sort of error do you get?

You could try the ROWS_PER_BATCH option and set it to 1, but that may
not help depending on the issue.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx



.



Relevant Pages

  • Re: Importing data into MS-SQL from AcuCobol
    ... how you are loading the data. ... - Look into using DTS in SQL Server. ... not used it with AcuODBC, ... > interface to load the data. ...
    (comp.lang.cobol)
  • Re: [opensuse] How to set up LIRC?
    ... and if not then loading it and setting it to load at boot time. ... I Googled around and learned a bit about loading kernel modules but nothing answered this question. ... Well further Google attempts and a visit to the LIRC website seemed to indicate that I need another module loaded in the kernel called lirc_serial. ...
    (SuSE)
  • Re: Next Version of GDI+ (maybe GDI+ 2.0)
    ... loading and manipulating of such files isn't lightning fast unless you have really powerfull dedicated hardware. ... to see whole image you need to read whole image, and then eventualy generate a smaller sample for display. ... BUT to have this smaler sample you need to load ALL the pixels of oryginal image. ...
    (microsoft.public.dotnet.framework.drawing)
  • RE: 66 running processes?
    ... Win XP, a firewall and an AV and about seven background utilities, and with ... want it to load right from boot up, or could you take it off the load list ... Stopping programs you use loading early is only likely to make much ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Next Version of GDI+ (maybe GDI+ 2.0)
    ... Alejandro Lapeyre ... > loading and manipulating of such files isn't lightning fast unless you ... > smaller sample for display. ... > load ALL the pixels of oryginal image. ...
    (microsoft.public.dotnet.framework.drawing)

Quantcast