Showing posts with label conditions. Show all posts
Showing posts with label conditions. Show all posts

Thursday, March 29, 2012

About a RS version and previous conditions of use

I own a Windows Small Bussiness 2003 license which includes SQL server 2000
Standard Edition and additionally came with a version of Reporting Services.
I want to learn and use it (Reporting Services) as a beginner but when I
try to install it a message appears indicating that I need to install or
configure previously two products:
a) Visual Studio .Net 2003
b) IIS 5.0
Do I need both of 'em just to begin doing simple reports?
I supposed a simple use like I could obtain through Crystal reports 7.0 or
so on.
Please, help me.
Probably next year we will migrate to a new version of Microsoft SBS
Is it worth to do efforts with the versions I own nowadays or not?
Thanks alot in advance.
--
sanpetusRS 2000 report designer require some copy of VS 2003 to be installed. In the
past VB.net 2003 was the cheapest way to do this (about $100). I don't know
now. Note that the VB 2005 will not work for this.
In RS 2005 it comes with a version of VS 2005 so no additional purchase is
necessary.
RS is a asp.net application and as such it needs IIS. IIS comes with all
servers. It might need to configured though.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"sanpetus" <sanpetus@.discussions.microsoft.com> wrote in message
news:14FE57B4-A059-4B0F-8539-C9D64CBAA6B6@.microsoft.com...
>I own a Windows Small Bussiness 2003 license which includes SQL server 2000
> Standard Edition and additionally came with a version of Reporting
> Services.
> I want to learn and use it (Reporting Services) as a beginner but when I
> try to install it a message appears indicating that I need to install or
> configure previously two products:
> a) Visual Studio .Net 2003
> b) IIS 5.0
> Do I need both of 'em just to begin doing simple reports?
> I supposed a simple use like I could obtain through Crystal reports 7.0 or
> so on.
> Please, help me.
> Probably next year we will migrate to a new version of Microsoft SBS
> Is it worth to do efforts with the versions I own nowadays or not?
> Thanks alot in advance.
> --
> sanpetus

Sunday, February 19, 2012

A Query on Outer Join.

Hi.

I want to know the difference between taking an outer join on tables and taking an outer join on the conditions that are defined between the tables.

Thanks in Advance.

outer join on tables :
A join that includes all the rows from the joined tables that have met the search conditions, even rows from one table for which there is no matching row in the other join table. For result set rows returned when a row in one table is not matched by a row from the other table, a value of NULL is supplied for all result set columns that are resolved to the table that had the missing row.

outer join on the conditions :

Join conditions can be specified in either the FROM or WHERE clauses; specifying them in the FROM clause is recommended. WHERE and HAVING clauses can also contain search conditions to further filter the rows selected by the join conditions.

|||

Hi.

Thanks a lot for the reply.

I got about the outer join that is performed on tables.But, the outer join on the conditions is still confusing.

Can you help me with an example so that i can understand the concept in a better way.

Also, when and why outer joins on the conditions are used.Is it better than outer join that is performed on tables.I am really confused.

I request you to help me out from this confusion.

Thanks in Advance.

|||

The difference between specifying an outer join in the FROM clause and the WHERE clause has to do with when the conditions are applied. Conditions specified in the WHERE clause are applied after the JOIN has happened. This means that the whole record will be excluded instead of just one half.

Consider a report of employees and any car that is not red.

Select e.name, c.model, c.color

From employees e

Left Join cars c

on e.empID = c.empID

and c.color <> 'RED'

Select e.name, c.model, c.color

From employeess e,

cars c

Where e.empID *= c.empID

And c.color <> 'RED'

The second one will not display employees that only have a red car.

|||

This seems a little confusing. Please do not mix ANSI syntax and legacy join syntax, since they don't work the same internally.
The explanation is correct, but the examples may be confusing, since the latter, old legacy syntax should be avoided and never used at all. (for one thing there is no separation between the join condition and the were clause in it)

A better example may be:

Select e.name, c.model, c.color
From employees e
Left Join cars c
on e.empID = c.empID
AND c.color <> 'RED'

Select e.name, c.model, c.color
From employees e
Left Join cars c
on e.empID = c.empID
WHERE c.color <> 'RED'

To apply this on something that most already have, we can use Northwind.
Just try out both and look at the results, and I think that it should be fairly easy to understand the differences.
The main thing is that the filter we are playing with is applied to the inner table, that's when it makes a difference if the filter goes into the ON clause or the WHERE clause.
As said earlier, the WHERE filters is applied after the join is formed, where filtering in the ON clause does affect how the join is formed. (for the example below, compare which homepages is included or excluded from what is available with the different examples)

So, to the original poster, it comes down to what question you want to have an answer to, if your filter should be in the ON or WHERE clause.
In addition, this is 'only' important when the filter is to be applied to the inner table, filtering on columns in the outer table doesn't produce different results regardless of if it's in the ON or WHERE clause.

use northwind
go
select p.productname, p.unitprice, s.companyName, s.HomePage
from products p
left join suppliers s
on s.supplierID = p.supplierID
and s.HomePage like '#%'
go
select p.productname, p.unitprice, s.companyName, s.HomePage
from products p
left join suppliers s
on s.supplierID = p.supplierID
where s.HomePage like '#%'
go

Compare the results from the above, and you'll also see that the latter is behaving excactly as an inner join, which, if someone was to write the query, probably wouldn't be their intention.
Also, you can compare with the results of the entire join except the last and/where line to see which homepages that is included/excluded due to filtering, and how that affects what is or isn't included from the inner table, and how the outer table is filtered.

Hope it didn't get too confusing..?
=;o)
/Kenneth

|||Of course, the initial question asked the difference between outer joining on Tables and outer joining on conditions. If that does not refer to the older syntax, then I'm not sure how to interpret it.|||

Hi KeWin.

Thanks a lot.