Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 12:45 PM
Authorized User
 
Join Date: Aug 2003
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kaustav Send a message via Yahoo to Kaustav
Default SQL query problem in Access - Urgent

Sir,
I would like have help on the following tables:
Table: DEPOSIT
fields:DNO(number), JOINT1(number) , JOINT2(number)

Table: USERS
fields: UID(number),NAME(text)

Relatioship among the tables: NOne

My problem is I want to Display Deposit.DNO, USERS.NAME, USERS.Name from the tables by joining them together by the joint1= user.uid and also joint2=users.uid in a single row for each DNO.

Is this possible. Let me know the query or the stored procedure. Also let me know where to write it.

Bye

------------------
Kaustav
__________________
------------------
Kaustav
 
Old September 26th, 2005, 05:50 PM
Friend of Wrox
 
Join Date: Jul 2005
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are in Access,

1) add the deposit table and then the User table twice (USERS and USERS_1).

2) Link the USERS tabnle ID to JOINT1 and then link USERS_1 (the second USERS tbale to JOINT2. Now you can add the fields you need to you query and they will appear as a single row.



Boyd
"Hi Tech Coach"
Access Based Accounting/Business Solutions developer.
http://www.officeprogramming.com
 
Old September 30th, 2005, 11:39 PM
Authorized User
 
Join Date: Aug 2003
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kaustav Send a message via Yahoo to Kaustav
Default

Thankx for your help. But the problem is I am unable to add foreign key reference between the fileds dur to some other reason.
Can you tell me how can this be possible then by a query to the database. If stored procedure is required plz specify.
Byye

------------------
Kaustav





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access and SQL query Issue ayazhoda Access VBA 0 May 16th, 2008 07:54 AM
Problem running SQL query on Access DesignsOnline.co.uk Access ASP 1 November 26th, 2006 06:09 PM
SQL query question in Access dlamarche Access 3 April 3rd, 2005 10:42 PM
Access vs. SQL query Designer Mitch Access 7 October 14th, 2003 04:25 PM
Query faster in Access than SQL Server Dritchy SQL Server 2000 5 September 10th, 2003 04:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.