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

<*> 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/
 



Reply via email to