p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   jet sql query help (http://p2p.wrox.com/showthread.php?t=34700)

connect2sandep October 28th, 2005 04:50 AM

jet sql query help
 
In Access, I have two tables
Users(userID, UserName, Password, bool Online) and
Contacts(UserID, ContactID)
In Jet SQL please help me retrieve the username of contacts of a particular username
who are online.
please help me, i am stuck.


mmcdonal October 28th, 2005 06:55 AM

SELECT [UserName], [bool Online]
   FROM Users
   WHERE [bool Online] = True ' or Yes or -1 depending on your table design



mmcdonal

mmcdonal October 28th, 2005 06:55 AM

Sorry, I didn't get the second table... hang on a sec...

mmcdonal

mmcdonal October 28th, 2005 06:59 AM

SELECT Users.UserName, Contacts.ContactID, Users.[bool Online]
FROM Users INNER JOIN Contacts ON Users.UserID = Contacts.UserID
WHERE (((Users.[bool Online])=Yes));

Where are you trying to make this query? Where are you getting the UserName?

HTH

mmcdonal

connect2sandep October 28th, 2005 02:16 PM

i wanted to retrieve the contacts name. this query retrieves only the Contacts UserID. please help



All times are GMT -4. The time now is 08:42 AM.

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