[AccessD] Quick Update Solution

Brett Barabash BBarabash at TappeConstruction.com
Mon May 12 14:48:36 CDT 2003


Paul,
This should do it:

INSERT INTO Table2 ( LINK_PT )
SELECT Table1.LINK_PT
FROM Table1
LEFT JOIN Table2
ON (Table1.LINK_PT = Table2.LINK_PT)
WHERE Table2.LINK_PT Is Null;


-----Original Message-----
From: Paul Black [mailto:pblack at hotmail.com]
Sent: Monday, May 12, 2003 2:38 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Quick Update Solution


Is there a quicker/better way to append data than the method I currently 
use:

select all records from table 1

move to first record in table 1

loop through every record in table 2 to see if a match occurs on LINK_PT 
field

If there is a match it is skipped.

If there is no match then table 1 record is appended to table 2

Move to next record in table 1 and continue loop until .eof

I can do it this way but is there another quicker solution. As the tables 
grow the speed slows. I am using A97 for the app.

Thanks

Paul

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--------------------------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Tappe Construction Co.

Scanning of this message and addition of this footer is performed
by SurfControl E-mail Filter software in conjunction with 
virus detection software.



More information about the AccessD mailing list