Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make INSERT INTO continue even when an error occurs

Status
Not open for further replies.

JordanCN2

IS-IT--Management
Feb 7, 2011
39
US
I have a table with about a million records in it. I need to alter the data in one of the columns to add some info to it so I want to just perform a

INSERT INTO TABLE-NEW
SELECT {MYQUERY} FROM TABLE-OLD

When I do this I get the error:

OLE DB provider 'SQLNCLI' for linked server 'MYSERVER' returned invalid data for column 'TABLE-OLD.problemfield'.

The data in that column is a float data type with some fractional number that appears to be different for every record. There really is not a way I can sort through it to see what the problem is so is there a way I can just have the insert query run and ignore problem records?
 
Thanks, That worked out for me.

I don't know how the strange data got into the float field, but this worked out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top