Jumat, 03 Februari 2017

Re: [MS_AccessPros] Append Query Does not work

 

David-


Run this query:

SELECT DISTINCT [_tblImportTanks2].ProductFamily
FROM _tblImportTanks2 LEFT JOIN 
    lu_tblProductFamilies ON [_tblImportTanks2].ProductFamily = lu_tblProductFamilies.ProductFamilyName
WHERE lu_tblProductFamilies.ProductFamilyName is Null

If you get no rows, then that means that all the names in the import table already exist in the lookup table.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Feb 3, 2017, at 7:13 PM, david.pratt@outlook.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have tried all the suggestions and I still get no records appended due to key violation.

Correct me if I am wrong, but I think all the suggestions have been focused on avoiding the error message of "x number of records were not added due to key  violations".
I am not trying to avoid the error message at this time.  I would be happy to get a message saying "xx records were added and yy were not due to key violations".

I have something set incorrectly such that I unable to add any records.

My primary key is an autonumber ID key and ProductFamilyName is indexed and unique. I must be doing something fundamentally wrong somewhere.



__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (15)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar