PC Review


Reply
Thread Tools Rate Thread

Insert Statement

 
 
andy_42 via AccessMonster.com
Guest
Posts: n/a
 
      21st Feb 2007
I am pulling data out of one table, validating the invididual fields for
numeric or date values, and inserting all of the data in a new table. I'm
trying to find an efficient method for accomplishing this.

Here are my current thoughts:

open recordsource
loop records (
validate record field one, store in array
validate record field two, store in array
)

Now I have an array of 12000 records and I want to insert them all into a new
table. Looping the array and inserting each record is not practical.

Any thoughts on a better way to accomplish this? (I don't want to alter the
first table in any way)

Is it possible to run an insert into statement that selects all fields from
an array?

Thanks!

--
Message posted via http://www.accessmonster.com

 
Reply With Quote
 
 
 
 
Jason Lepack
Guest
Posts: n/a
 
      22nd Feb 2007
Why not just create a single SQL Insert Query that will use criteria
to filter out the "bad" data?

On Feb 21, 5:49 pm, "andy_42 via AccessMonster.com" <u28081@uwe>
wrote:
> I am pulling data out of one table, validating the invididual fields for
> numeric or date values, and inserting all of the data in a new table. I'm
> trying to find an efficient method for accomplishing this.
>
> Here are my current thoughts:
>
> open recordsource
> loop records (
> validate record field one, store in array
> validate record field two, store in array
> )
>
> Now I have an array of 12000 records and I want to insert them all into a new
> table. Looping the array and inserting each record is not practical.
>
> Any thoughts on a better way to accomplish this? (I don't want to alter the
> first table in any way)
>
> Is it possible to run an insert into statement that selects all fields from
> an array?
>
> Thanks!
>
> --
> Message posted viahttp://www.accessmonster.com



 
Reply With Quote
 
=?Utf-8?B?RGFtaWFuIFM=?=
Guest
Posts: n/a
 
      22nd Feb 2007
Hi Andy,

Couldn't you just run an Insert Into from your original table? You could
perform some validation as you proceed if you are simply checking for a
numeric/date value etc.

Damian.

"andy_42 via AccessMonster.com" wrote:

> I am pulling data out of one table, validating the invididual fields for
> numeric or date values, and inserting all of the data in a new table. I'm
> trying to find an efficient method for accomplishing this.
>
> Here are my current thoughts:
>
> open recordsource
> loop records (
> validate record field one, store in array
> validate record field two, store in array
> )
>
> Now I have an array of 12000 records and I want to insert them all into a new
> table. Looping the array and inserting each record is not practical.
>
> Any thoughts on a better way to accomplish this? (I don't want to alter the
> first table in any way)
>
> Is it possible to run an insert into statement that selects all fields from
> an array?
>
> Thanks!
>
> --
> Message posted via http://www.accessmonster.com
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to insert data from datagrid to datasource using insert sql statement sandeep.damodar Microsoft VB .NET 1 16th Mar 2007 01:17 PM
How can i Insert multiple rows by using Insert statement in MS Acc =?Utf-8?B?S2F1c2hpayBTYWhh?= Microsoft Access Queries 3 15th Mar 2005 02:51 PM
What is the use of select statement in insert statement ? cmhasan Microsoft ADO .NET 1 10th Dec 2004 09:12 PM
SQL statement to insert a value generated by a SELECT statement? Rob Richardson Microsoft ADO .NET 2 21st Feb 2004 05:26 PM
How do I insert a NULL value inside an INSERT statement Dino M. Buljubasic Microsoft ADO .NET 10 19th Dec 2003 11:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:33 PM.