RE: SQL Statement - Selecting details if they exist if not...

2001-08-14 Thread Neil Lunn
>-Original Message- >From: Jon Barker [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, August 14, 2001 8:28 PM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: Re: SQL Statement - Selecting details if they exist if not... > > > >I'm not completely sure

Re: SQL Statement - Selecting details if they exist if not...

2001-08-14 Thread Jon Barker
I'm not completely sure I understand you but:- select * from Jobs left outer join Users on Jobs.JobID=Users.JobID; Should give all the jobs, with null user data where there isn't a user associated with a job. Jon > Hiya all, > > I have (for illustration purposes) two tables in an ODBC datab

SQL Statement - Selecting details if they exist if not...

2001-08-14 Thread Richard Chiswell
Hiya all, I have (for illustration purposes) two tables in an ODBC database: Table 'Jobs'=JobID,JobDescription,JobDate Table 'Users'=UserName,JobID,LastViewedDate Basically I want to select all JobID's and JobDescriptions from Jobs where the user has a 'lastvieweddate' within the last 10 days.