Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-05-2009
Member
 
Join Date: Apr 2009
Posts: 89
SQL querry to join 2 tables from access dB

Hello,

Can anyone here guide me how to write the query to find Two tables within the available database and it should be possible to join then and then to retrieve both the username and the any other field from the table, any other table this is because it would be the custom table field which we could change at any time further.

Thanks
Reply With Quote
  #2  
Old 09-05-2009
Member
 
Join Date: Mar 2008
Posts: 258
Re: SQL querry to join 2 tables from access dB

I have some doubts and these are as follows the two tables which you wanted to join are located in the same Access file or these are two different Access files. These two tables would be changed in the future?

I had created the join table with the existing two tables and when the New table will be created that was the result of the previous two was required Access 2000 or higher required.
Reply With Quote
  #3  
Old 09-05-2009
Member
 
Join Date: Jan 2006
Posts: 211
Re: SQL querry to join 2 tables from access dB

Basically whenever you wanted to join to tables you need to join your tables on a common field (has to be same data type),that is we could say the Key value. You may want to read into relationships:

and for that you need to write like this relation:

Code:
SELECT l.FullName, n.FullName, m.CMNumber, m.NotificationList
FROM Login l INNER JOIN Main m ON m.MainToLogin=l.MainToLogin INNER JOIN Notify n ON l.FullName=n.FullName
WHERE n.Email = m.NotificationList
The Starting name or letters would be the aliases for tables. The first criteria was unnecessary because of the second inner join.
Reply With Quote
  #4  
Old 09-05-2009
Member
 
Join Date: Jan 2009
Posts: 99
Re: SQL querry to join 2 tables from access dB

Following are the steps that you need to follow to join two tables:

Step1:
Select and Open your database server it would be anything i.e. Access, SQL Server, Oracle, MySQL

Step 2:
If you have the database related to your customer or a product data Load it into your actual database.

Step 3
Porduct Database
Customers records etc.


Step 4
Select the Table with which you wanted to apply a join function such as Orders

Step 5
To join these two tables on the customer ID field. following query should be fired

Code:
SELECT customers.*,orders.* FROM customers,orders WHERE customers.customerid = orders.customerid
The above statement says, give me all of the data from the customers table and from the orders table where the customer_id fields are equal to one another.

Step 6
Once this done you would see the Final Results in the next table.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "SQL querry to join 2 tables from access dB"
Thread Thread Starter Forum Replies Last Post
Cannot join big tables in Zynga Poker rihit Video Games 7 23-11-2011 08:05 AM
Join two tables using SQL query vaib288932 Software Development 3 20-08-2010 12:01 PM
Relationship among tables in access Bindusar Windows Software 5 08-01-2010 05:47 AM
Link two tables Using MS Access jean-paul martell Windows Software 3 03-10-2009 10:14 AM
create tables in MS Access through VB6 Derek Software Development 2 11-10-2008 03:20 PM


All times are GMT +5.5. The time now is 08:29 PM.