sql question
- From: Terry <cooleyt@xxxxxxxxxx>
- Date: Tue, 23 Jan 2007 16:04:35 -0500
using ado and microsoft access
the following join works
select o.otrq_emp_clocknum, o.otrq_date, o.otrq_period,
e.emp_clocknum, e.emp_lastname + ', ' + e.emp_firstname as fullname
from otrequests o
inner join employee e on o.otrq_emp_clocknum = e.emp_clocknum
the otrq_period is an id field from a lookup table
otp_id, otp_description from otperiodsLkup
otrq_period = otp_id
I want to get the otp_description to display its text value
i tried
select o.otrq_emp_clocknum, o.otrq_date, o.otrq_period,
e.emp_clocknum, e.emp_lastname + ', ' + e.emp_firstname as fullname
from otrequests o, otperiodsLkup p
inner join employee e on o.otrq_emp_clocknum = e.emp_clocknum
where p.otp_id = o.otrq_period
this gives a syntax error in join
how do I get the lookup value into the select?
thank you for any help
.
- Follow-Ups:
- Re: sql question
- From: Leonid Zeitlin
- Re: sql question
- Prev by Date: Re: "cannot perform this operation on a closed dataset"
- Next by Date: sql join and lookup table question
- Previous by thread: Single (real) parameters types problem
- Next by thread: Re: sql question
- Index(es):
Relevant Pages
|