SQL Statement

M

Mike

I have 2 tables. Table A contains 2 fields which are not in Table B. The
records in Table A are also in Table B but without the two additional fields.
Table B contains all the records in Table A (minus the 2 addl fields) and
approximately 5K additional records. A unqiue key from Table A is also on
Table B for all matching records, just without the other 2 fields.

I want to combine both tables while being able to include the two additional
fields from Table A to Table B.

Any help would be appreciated.

Thanks,
Mike
 
S

Sylvain Lafontaine

Well, if you already know about foreign keys, then you probably about the
JOIN statement to join two or more tables in a query; so I don't really
understand what you are looking for.

Is this about those 5K additional records that you're worried about? If
yes, then you should use a LEFT OUTER JOIN instead of an INNER JOIN.

Also, this newsgroup is about ADP and SQL-Server and is not really about
MS-Access/JET queries. I tell you that because the syntaxe for LEFT JOIN is
slightly different between T-SQL and JET-SQL; so what I might tell you for
SQL-Server might not work directly if you use it verbatim in a MS-Access JET
query or querydef.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top