Re: Combining results from three sources
- From: "Imran Aziz" <imran@xxxxxxx>
- Date: Mon, 15 Aug 2005 12:40:13 +0100
Hum thanks a lot for the info, decided to dump data from mySQL server to a
temp table (using a backend process) in the same MS SQL database and then do
a regular union on it. This might be more manageable and faster to work
with.
Thanks a lot!
Imran.
"Marina" <someone@xxxxxxxxxx> wrote in message
news:%23qqvZE2nFHA.3304@xxxxxxxxxxxxxxxxxxxxxxx
> Ok, this would not be hundreds of lines of code. It might be slow to find
> duplicates, but it is not going to be a lot of coding.
>
> "Adrian Moore" <AdrianMoore@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:8F3FD516-5812-48A1-B54E-C09B699C5328@xxxxxxxxxxxxxxxx
>> Imran,
>>
>> You'll have to resort to writing a couple hundred lines of ADO.NET code
>> in
>> your favorite .NET language, I'm afraid. You'll need to combine the rows
>> of
>> each table into a new table and then perform a DISTINCT algorithm on the
>> new
>> table.
>>
>> Good Luck
>> Ad.
>>
>>
>>
>> "Imran Aziz" wrote:
>>
>>> Thanks a lot for the link , seems nice, but I dont want to use a third
>>> party
>>> shareware application to do that, wanted to find a way that is provided
>>> by
>>> ..net framework itself.
>>>
>>> Imran.
>>>
>>>
>>> "Adrian Moore" <queryadataset@xxxxxxxxxxx> wrote in message
>>> news:OF4S5jznFHA.2444@xxxxxxxxxxxxxxxxxxxxxxx
>>> > Imran,
>>> >
>>> > You might be interested in the assembly I've been working on at
>>> > http://www.queryadataset.com. It lets you perform complex SQL SELECT
>>> > statements including UNION, JOINS, GROUP BY, HAVING, ORDER BY,
>>> > sub-queries, functions, aggregates etc against the tables in a
>>> > dataset.
>>> >
>>> > In your case, you'll want to do a UNION on the three tables in the
>>> > dataset:
>>> >
>>> > DataSet ds = new DataSet;
>>> > //populate with data from two SQL server databases and MySQL.
>>> >
>>> > string sql = "SELECT * FROM source1 UNION SELECT * FROM source2 UNION
>>> > SELECT * FROM source3";
>>> > DataView dv = QueryADataSet.DsCommand.Execute(sql, ds);
>>> >
>>> > Its a lot easier than writing ADO.NET code by hand.
>>> >
>>> > Hope this helps
>>> > Adrian Moore
>>> > http://www.queryadataset.com
>>> >
>>> > "Imran Aziz" <imran@xxxxxxx> wrote in message
>>> > news:u4HKk1ynFHA.3564@xxxxxxxxxxxxxxxxxxxxxxx
>>> >> Hello All,
>>> >> I have to combine search results from three different data
>>> >> sources,
>>> >> two are separate databases in an SQL server one is a mySQL server
>>> >> database. I get the search results from each of them in my separate
>>> >> classes. Now I need to combine them and remove duplicates how do I
>>> >> work
>>> >> with that ?
>>> >>
>>> >> say
>>> >> DataSet ds1 has now got three tables source1, source2 and source3 how
>>> >> do
>>> >> I perform an in-memory query on the dataset tables to get a view that
>>> >> removes duplicates ?
>>> >>
>>> >> Imran.
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>
>
.
- References:
- Combining results from three sources
- From: Imran Aziz
- Re: Combining results from three sources
- From: Adrian Moore
- Re: Combining results from three sources
- From: Imran Aziz
- Re: Combining results from three sources
- From: Adrian Moore
- Re: Combining results from three sources
- From: Marina
- Combining results from three sources
- Prev by Date: Re: Save System.Data.DataTable to new SQL Table
- Next by Date: Datagrid.Select Question
- Previous by thread: Re: Combining results from three sources
- Next by thread: Re: Combining results from three sources
- Index(es):
Relevant Pages
|