UserID be setup differently from the Username or Path
columns?
So the UserID for each table I have to set a
Relationship...?
On Thu, 7 Oct 2004 12:44:28 +0100, "Adrian Lynch" wrote:
>
> You don't really need them to be separate DBs. Here's
> the basic premise...
>
> Two tables, one with users in, the other with user
> paths. One user can have
> many paths.
>
> tblUsers
> UserID Username
> 1 Adrian
> 2 Bob
> 3 Sue
>
> tblUserPaths
> UserID Path
> 1 c:\
> 1 c:\qwerty
> 1 c:\qwerty\berty
> 2 d:\a\path\to\nowhere
> 3 d:\look\mum\I\got\me\a\path
>
> UserID in both tables would be integers, the path
would
> be varchar.
>
> To get all the paths for me...
>
> SELECT up.Path
> FROM tblUserPaths up
> INNER JOIN tblUsers u ON up.UserID = u.UserID
> WHERE u.Username = 'Adrian'
>
> How's that?
>
> Ade :O)
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
