MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 25th, 2004, 10:35 AM
fenderguy fenderguy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 fenderguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How can this query be converted using JOIN to wrk porperly?

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > How can this query be converted using JOIN to wrk porperly?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT