Thursday, March 29, 2012

comparing two datasets

Hello - I would like to perform something lika a "diff" between two datasets
in my report.
Lets say that DS1 holds all customers and DS2 holds customers owning a car.
How do I find them customers not owning a car?
DavidPerhaps you could create a 3rd data set that would be some combination of the
queries used to create the 1st and 2nd data sets?
DS1 -
select customername
from customers
DS2 -
select name
from carowners
DS3 -
select customername
from customers
where customername in (
select name
from carowners
)
just a thought... i am not sure whast your schema looks like - there may be
a simpler solution or my solution may be too simple.
--
~lb
"David" wrote:
> Hello - I would like to perform something lika a "diff" between two datasets
> in my report.
> Lets say that DS1 holds all customers and DS2 holds customers owning a car.
> How do I find them customers not owning a car?
> David
>|||Problem is that one of the datasets is tabular data from a textfile, I
cannot use SQL to query it, but otherwise your answer still helps me to
define the problem better, thx :)
Sorry for not pointing out the flat file-stuff in the first place.
David
"lonnye" <lonnye@.discussions.microsoft.com> wrote in message
news:B3B4E2AF-A516-44EC-BE2E-EF5D98EC83AD@.microsoft.com...
> Perhaps you could create a 3rd data set that would be some combination of
> the
> queries used to create the 1st and 2nd data sets?
> DS1 -
> select customername
> from customers
> DS2 -
> select name
> from carowners
> DS3 -
> select customername
> from customers
> where customername in (
> select name
> from carowners
> )
> just a thought... i am not sure whast your schema looks like - there may
> be
> a simpler solution or my solution may be too simple.
> --
> ~lb
>
> "David" wrote:
>> Hello - I would like to perform something lika a "diff" between two
>> datasets
>> in my report.
>> Lets say that DS1 holds all customers and DS2 holds customers owning a
>> car.
>> How do I find them customers not owning a car?
>> Davidsqlsql

No comments:

Post a Comment