Forums
This topic is locked
Creating a recordset from two tables....
Posted 25 Feb 2003 02:57:49
1
has voted
25 Feb 2003 02:57:49 Phil Grimpo posted:
Let's say I have a MEMBER table and an ATTRIBUTES table and I do a statement like this:SELECT Member.MemberID, Attributes.Attribute1
FROM Member, Attributes
WHERE Member.MemberID = 1 AND Attributes.MemberID = Member.MemberID
This will only return results if there are attributes for that member. Is there a way to force it to return whatever it can and leave the rest of the record set blank?
So it would look like this:
MEMBER ATTRIBUTE1
Sam <nothing>
Is this possible or do I HAVE to make sure there is attribute data for every member in order to return a recordset?
Thanks!
-Grimps
Phil Grimpo
Executive Director
Inspirmedia
Replies
Replied 28 Feb 2003 17:07:56
28 Feb 2003 17:07:56 Vince Baker replied:
The best way to solve this would be to create a query/view in your database with an outer link from the member table to the attribute table. This will return all the members with or without attributes.
Search the help files in your db if you dont know how to do this.
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting
Search the help files in your db if you dont know how to do this.
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting