Advertisement

11.09.2005 at 07:19AM PST, ID: 21624840
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.4

##500## including NULLS - A simple select

Asked by nickrjsmith in MS SQL Server

Tags: ,

i have a join where when i get the results.  It removes any rows with a null value.  I want to include the nulls as well.


eg.  This works

select a.customer_no, a.perf_code, a.perf_dt, a.num_seats, a.tck_amt, a.order_dt, a.location, a.section,
c.description as 'Prefix', b.fname, b.lname, b.create_dt as 'LengthOfTime',
d.street1, d.street2, d.city, d.postal_code,
e.description as 'Country',
a.mos_category,
g.description as 'Let',
a.price_type
from lt_ticket_hist a, t_customer b, tr_prefix c, t_address d, tr_country e, t_perf f, tr_perf_type g
where a.customer_no = b.customer_no
and b.prefix = c.id
and a.customer_no = d.customer_no
and d.country = e.id
and a.perf_code = f.perf_code
and f.perf_type = g.id
and a.perf_code like 'PROM%'
and d.inactive <> 'Y'


but when i add in the h.description as 'PriceType' and the join for and a.price_Type = h.id like below I get about 150000 less results because the mos is null.   How do i include the nulls.


select a.customer_no, a.perf_code, a.perf_dt, a.num_seats, a.tck_amt, a.order_dt, a.location, a.section,
c.description as 'Prefix', b.fname, b.lname, b.create_dt as 'LengthOfTime',
d.street1, d.street2, d.city, d.postal_code,
e.description as 'Country',
a.mos_category,
g.description as 'Let',
a.price_type,

h.description as 'PriceType'

from lt_ticket_hist a, t_customer b, tr_prefix c, t_address d, tr_country e, t_perf f, tr_perf_type g, tr_MOS h
where a.customer_no = b.customer_no
and b.prefix = c.id
and a.customer_no = d.customer_no
and d.country = e.id
and a.perf_code = f.perf_code
and f.perf_type = g.id

and a.price_Type = h.id

and a.perf_code like 'PROM%'
and d.inactive <> 'Y'

is it just a different join?Start Free Trial
[+][-]11.09.2005 at 07:22AM PST, ID: 15256774

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: join, selecting
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 4
Solution Grade: A
 
 
[+][-]11.09.2005 at 07:23AM PST, ID: 15256775

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 07:23AM PST, ID: 15256781

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 07:24AM PST, ID: 15256792

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43