Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 26th, 2005, 12:45 PM
Authorized User
 
Join Date: Aug 2003
Location: Kolkata, West Bengal, India.
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
Reply With Quote
  #2 (permalink)  
Old September 26th, 2005, 05:50 PM
Friend of Wrox
 
Join Date: Jul 2005
Location: Oklahoma City, OK, USA.
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
Reply With Quote
  #3 (permalink)  
Old September 30th, 2005, 11:39 PM
Authorized User
 
Join Date: Aug 2003
Location: Kolkata, West Bengal, India.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.