|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All
I hit a wall trying to get this query working. It is producing wrong Client Names on some rows after query. So I was trying to convert it using JOINS, but still in difficulty. It is dealing with 5 tables. And this is the original query. 'If (Check1.Value = 1 And Check2.Value = 0 And Check3.Value = 0) Then 'strQuery1 = "select tblRTClients.Name, " & _ '"tblRTPtype.Ptype, tblProperty.address1, tblProperty.address2, tblProperty.Tcity, " & _ '"tblProperty.District, tblProperty.PostCode, tblRTRef.DMHRef, " & _ '"tblRTRef.AssessRef, tblRTRef.AssessOffice, " & _ '"tblRTAppeal.FeeNumber, tblRTAppeal.AppealStyle, tblRTAppeal.NNRV, tblRTAppeal.ANRV, tblRTAppeal.DatePosted, " & _ '"tblRTAppeal.DateAckd, tblRTAppeal.JobStatus, tblRTAppeal.ClientConfirm, " & _ '"tblRTAppeal.DateCitation, tblRTAppeal.Grounds, tblRTAppeal.Comparisons, tblRTAppeal.EffetDate " & _ '"from tblRTClients, tblProperty, tblRTRef, tblRTAppeal, tblRTPtype " & _ '"where (tblRTClients.Name = '" & DataCombo1.Text & "')" & _ '"and tblRTClients.pid = tblRTAppeal.pid " & _ '"and tblProperty.pid = tblRTAppeal.pid " & _ '"and tblRTClients.pid = tblProperty.pid " & _ '"and tblProperty.pid = tblRTRef.pid " & _ '"and tblProperty.PtypeId = tblRTPtype.PtypeId " & _ '"order by tblProperty.pid" Thanks for your help. cheers Dan |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > How can this query be converted using JOIN to wrk porperly? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|