DUH! <banging her head against the desk> Thanks...I've been looking at this stuff WAY too long/critically...can't see the forest for the trees! ;-)
Dian ~ -----Original Message----- From: Adrian Forbes - ITD [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 10:53 AM To: [email protected] Subject: RE: [ASP] Query, why one works, one doesn't? SELECT csdbo.OWNER.clientid, csdbo.OWNER.patientid INNER JOIN ... It needs to be SELECT csdbo.OWNER.clientid, csdbo.OWNER.patientid FROM <table> INNER JOIN ... -----Original Message----- From: Dian D. Chapman [mailto:[EMAIL PROTECTED] Sent: 13 April 2005 4:49 To: Group - ASP Subject: [ASP] Query, why one works, one doesn't? Hi folks... Well, at least I've got things working! Thanks for being there! But now I'm pushing my luck to try to refine the working query...but don't understand what I'm doing wrong. I had to start with the essentials and move up from there to get what I needed. But now when I try to define just two fields versus * (first line), I get an error. Below are the two queries...lower one works when I select *. But if I attempt to refine down to the two fields that I really only need...I get a syntax error. Can anyone tell me what I'm doing wrong? '************error: "Syntax error near INNER" gstrSQLQuery = _ "SELECT csdbo.OWNER.clientid, csdbo.OWNER.patientid INNER JOIN csdbo.PATIENT ON " _ & "csdbo.OWNER.patientid = csdbo.PATIENT.patientid " _ & "WHERE csdbo.OWNER.clientid = " & glngClientRecNum _ & " ORDER BY csdbo.PATIENT.name DESC" '***********works gstrSQLQuery = _ "SELECT * FROM csdbo.OWNER INNER JOIN csdbo.PATIENT ON " _ & "csdbo.OWNER.patientid = csdbo.PATIENT.patientid " _ & "WHERE csdbo.OWNER.clientid = " & glngClientRecNum _ & " ORDER BY csdbo.PATIENT.name DESC" TIA! 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 The contents of this email and any attachments are sent for the personal attention of the addressee(s) only and may be confidential. If you are not the intended addressee, any use, disclosure or copying of this email and any attachments is unauthorised - please notify the sender by return and delete the message. Any representations or commitments expressed in this email are subject to contract. ntl Group Limited --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 4/12/2005 -- 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/
