index | search | no replies | posting guidelines | help login | register
Index » Products » ASP DataGrid
search this forum:
:: Master-Detailed DataGrid :: (3)Post a New Message | Post a Reply
Apr 12 2007, 11:11 AM
 Master-Detailed DataGridPost a Reply
 boku

View this author's profile Send this author a private message

since: Apr 12, 2007
from: somewhere

Does anyone know how to do a left join to return all records in the master table and only records in the second table where FileID is equal?

Here my sql statement:
"SELECT PSCMAIN.FileID, PSCMAIN.PatientID, PSCMAIN.ScanTime, " & _
            "PSCCHARGE.ChargeID,  PSCCHARGE.Scantime FROM PSCMAIN, PSCCHARGE " & _
            "WHERE PSCCHARGE.FileID *= PSCMAIN.FileID ;"

Apr 12 2007, 11:53 AM
 Re: Master-Detailed DataGridPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

FOR MS SQL Server

SELECT PSCMAIN.FileID, PSCMAIN.PatientID, PSCMAIN.ScanTime,
            PSCCHARGE.ChargeID,  PSCCHARGE.Scantime
FROM PSCCHARGE
LEFT OUTER JOIN PSCMAIN
ON PSCCHARGE.FileID = PSCMAIN.FileID





-------------------------
Ghost
Apr 12 2007, 2:03 PM
 Re: Master-Detailed DataGridPost a Reply
 boku

View this author's profile Send this author a private message

since: Apr 12, 2007
from: somewhere

Thanks.  That worked for Access as well.

Pages: (1)   [1]

search this forum: