I've been messing with this one for about 2 hrs now to see if I can figure
it out...but maybe someone here can see what I'm messing up?
In this query...asking for a bunch of specific fields from PATIENT and
CLIENT...joining them up through the 3rd OWNER table (patientid/clientid)
where the patientid = the current rec...I'm getting an error:
"Syntax error near ON"
Help!
gstrSQLQuery = _
"SELECT csdbo.CLIENT.lastname, csdbo.CLIENT.firstname, " _
& "csdbo.CLIENT.m_address1, csdbo.CLIENT.m_address2,
csdbo.CLIENT.m_city, " _
& "csdbo.CLIENT.m_state, csdbo.CLIENT.m_postalcode,
csdbo.PATIENT.patientid, " _
& "csdbo.PATIENT.name, csdbo.PATIENT.sexid, " _
& "csdbo.PATIENT.color, csdbo.PATIENT.birthdate,
csdbo.PATIENT.speciesid, " _
& "csdbo.PATIENT.breedid, csdbo.CLIPHONE.clientid, " _
& "csdbo.CLIPHONE.phone, csdbo.CLIPHONE.extension " _
& "FROM csdbo.CLIENT, csdbo.PATIENT INNER JOIN (csdbo.OWNER ON "
_
& "(csdbo.PATIENT.patientid=csdbo.OWNER.patientid) AND " _
& "(csdbo.CLIENT.clientid=csdbo.OWNER.clientid)) " _
& "WHERE (((csdbo.PATIENT.patientid)=" & glngPatientRecNum &
"));"
TIA for any help!
Dian ~
--
This email scanned and certified clean by AVG!
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 4/12/2005
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [email protected]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/