Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 New to Access..need a guardian angel

Author  Topic 

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 15:55:54
You know the scoop big project, needs to get done..i have never done a thing but read an access report, now i need to be an expert. Anyway I had a good week, figuring it out myself, but now I am stumped.


Basically I have a large customer list of 650,000 email addresses (tblA1) broken down in to queries of 50,0000.
lets call one query of 500000 tblA1 Query

i need to check the 50,000 email addresses in tblA1 Query against my 350000 list of emails in another table in another database tblglobalRemove091003s

If the address exists in both tblglobalRemove091003s and tblA1 Query

i want to remove it from tblA1 Query and save the query without those addresses.

i am lost between comparing tables, databases and queries. Any suggestions?

thanks in advance.

visit http://www.eBayDoug.com today!

X002548
Not Just a Number

15586 Posts

Posted - 2003-09-11 : 16:56:53
New to Access?

There's an Access forum that you should probably posting in instead..

Or new to SQL Server...then this is the place...more likely the Transact-SQL forum.

In any event, you need to post the code you have that breaks down the reult set to 50,000

It sounds like you want to eliminate duplicate emails...

It would be soemthing like

DELETE FROM myTable1 o
WHERE EXISTS (SELECT 1 FROM myTable2 i WHERE o.id = i.id)

But you could help us out with some more detail



Brett

8-)

SELECT @@POST=NewId()

That's correct! It's an AlphaNumeric!
Go to Top of Page

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 17:08:19
to get a 50000 email list out of tble a i made a query..

SELECT tblA1.emailaddress, tblA1.ID
FROM tblA1
WHERE (((tblA1.ID)<=50000));

now I have these 50K in a qry and want to compare them to a separate db of 350000 mails...if it is in the 350K db I want it out of the tbla query..
(deleted gone or made into another clean query without the bad mails)
hope that helps

visit http://www.eBayDoug.com today!
Go to Top of Page

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 17:09:41
do the tables we are comparing have to bee in the same db?

visit http://www.eBayDoug.com today!
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-09-11 : 17:15:31
you don't add or remove data from QUERIES -- you add or remove rows from TABLES.

A query is just a view of a table, a "virtual" table that you use to summarize a table, or to combine data from many tables. Definitely get a grasp on that concept before going to much further.

Are you using Access or SQL Server? If you are using Access, try posting your question in the Access forum. This is a SQL Server forum, which is a different product than Access.

So, when you say:
quote:

if it is in the 350K db I want it out of the tbla query



are you saying you don't want the query to display that row, or are you saying you would like to delete it from the table that "tbla query" is querying?


- Jeff
Go to Top of Page

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 17:22:06
actually I could compare the two tables so they automatically remove from the queries, but there is too much data in the master table so i thought i would break it down. can you save queries as new databases.
where is the access forum?


visit http://www.eBayDoug.com today!
Go to Top of Page

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 17:22:36
sorry i see the access forums

visit http://www.eBayDoug.com today!
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-09-11 : 17:27:27
quote:

actually I could compare the two tables so they automatically remove from the queries, but there is too much data in the master table so i thought i would break it down. can you save queries as new databases.
where is the access forum?



Doug -- read CAREFULLY my previous post, explaining what a query is and how it is different from a TABLE.

- Jeff
Go to Top of Page

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 17:32:31
i understand..ok

how would you propose i take 2 million emails it 10 databases ("a1, a2", etc), compare to and remove "bad mails" from a reference db "BADMAIL"? then break the remaining "OK to mails" into manageable groups that my email client can use.

visit http://www.eBayDoug.com today!
Go to Top of Page

ebaydoug
Starting Member

15 Posts

Posted - 2003-09-11 : 17:33:19
each database has unique identifying primary key field and emailaddress field


visit http://www.eBayDoug.com today!
Go to Top of Page
   

- Advertisement -