troubleshooting Question

missing records

Avatar of erezabou
erezabou asked on
Microsoft SQL Server 2008Microsoft SQL Server
4 Comments1 Solution209 ViewsLast Modified:
hi experts,

here is my view

 SELECT
  dbo.orcCHAMBRES.NUMCHB,
  dbo.orcCHAMBRES.TYPCHB,
  dbo.orcCHAMBRES.ETATCHAMB,
  dbo.orcPLANNING.DATEARRIV,
  dbo.orcPLANNING.NBADULTES,
  dbo.orcPLANNING.NOMCLI,
  dbo.orcPLANNING.NUMSEJOUR,
  dbo.orcSEJOURS.COMMENT,
  dbo.orcSEJOURS.MEMO,
  max( dbo.orcSEJOURS.DATEDEPART) AS max_planning_date
FROM
  dbo.orcCHAMBRES
  LEFT OUTER JOIN dbo.orcPLANNING ON (dbo.orcCHAMBRES.NUMCHB = dbo.orcPLANNING.NUMCHB)
  LEFT OUTER JOIN dbo.orcSEJOURS ON (dbo.orcPLANNING.NUMSEJOUR = dbo.orcSEJOURS.NUMSEJOUR)
WHERE
  dbo.orcPLANNING.DATEARRIV LIKE '20110715' AND
  dbo.orcCHAMBRES.TYPCHB NOT LIKE 'SALO'
GROUP BY
  dbo.orcCHAMBRES.NUMCHB,
  dbo.orcCHAMBRES.TYPCHB,
  dbo.orcCHAMBRES.ETATCHAMB,
  dbo.orcPLANNING.DATEARRIV,
  dbo.orcPLANNING.NBADULTES,
  dbo.orcPLANNING.NOMCLI,
  dbo.orcPLANNING.NUMSEJOUR,
  dbo.orcSEJOURS.COMMENT,
  dbo.orcSEJOURS.MEMO,
  dbo.orcSEJOURS.DATEDEPART
ORDER BY
  dbo.orcCHAMBRES.NUMCHB

I need it to be modified in order to show all the records from  dbo.orcCHAMBRES even if other tqbles have no values

thank
ASKER CERTIFIED SOLUTION
G Trurab Khan
Snr. Development Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros