473,508 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find record causing failure on Insert statement

ms
I am running an insert statement from a dbf file and there is one record causing
the insert to fail. A msg. is returned stating it is due to an invalid
datatype. There are 2 text fields, 2 numeric(double), and one date/time. I
assume it is one of the numeric or the date/time field. How can I determine the
culprit record?
There is one key field which is one of the text fields.
I am trying to write a JOIN query but have not been successful.
The insert statement is:
INSERT INTO stageItemDMD ( ItemNo, Demand, Issued, ActionBy, ActionType )
SELECT Item_Numbe, Supply_Dem, Issued_Sup, Action_Req, Action
FROM dbf_dmd;
thanks for any advice.
mark
Nov 13 '05 #1
1 1825
Could you load the data you're trying to insert into a recordset and then
loop through the recordset, inserting one record into the destination table
on each pass? Maybe have the recordset be sorted so that when the insert
fails you'll be able to look at the records that made it into the
destination table and you'll be able to see where the failure occurred in
the sorted source records...
"ms" <ms@nospam.comcast.net> wrote in message
news:n6********************@comcast.com...
I am running an insert statement from a dbf file and there is one record causing the insert to fail. A msg. is returned stating it is due to an invalid
datatype. There are 2 text fields, 2 numeric(double), and one date/time. I assume it is one of the numeric or the date/time field. How can I determine the culprit record?
There is one key field which is one of the text fields.
I am trying to write a JOIN query but have not been successful.
The insert statement is:
INSERT INTO stageItemDMD ( ItemNo, Demand, Issued, ActionBy, ActionType )
SELECT Item_Numbe, Supply_Dem, Issued_Sup, Action_Req, Action
FROM dbf_dmd;
thanks for any advice.
mark

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3533
by: salamol | last post by:
I has a strange question. My company is using a old system with Win NT 4.0 Server + MS SQL 7.0. The system is busy and handle a lot of SELECTs and INSERTs all the time. Sometimes, some...
4
3851
by: Tim Marshall | last post by:
This is an embarrassing question to which I should know the answer, but I am not 100% sure of myself. My applications, whether they are Jet or Oracle usually deal with reporting on existing apps...
3
15759
by: bill_hounslow | last post by:
I'm trying to transfer data from one Sql Server into a table on another, using a simple INSERT query in an Access database with links to tables on both servers (the reasons for this are complicated...
19
3442
by: davidgordon | last post by:
Hi, I need some pointers/help on how to do the following if it possible: In my access db, I have the following: Tables: Products, Sub-Assembly, Product-Pack Table, Products
9
5039
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
0
1312
by: Marc DVer | last post by:
I have a stored procedure that has a simple insert statement. I want to be able to tell if the insert statement executed successfully, and return using a tinyint whether the statement was...
6
3837
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
0
3833
by: polocar | last post by:
Hi, I have noticed a strange behaviour of CurrencyManager objects in C# (I use Visual Studio 2005 Professional Edition). Suppose that you have a SQL Server database with 2 tables called "Cities"...
6
2151
by: tedpottel | last post by:
Hi, I have the following code <?php //DatabaseConnect(); if (!($dblink = mysql_connect("drt- sport.com","drtspo_tedted","oreo8157"))) die(" could not connect to mysal"); if (!$dbconn =...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.