🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages Started by Sreekanth Reddy Bandi Thu, 25 Mar 2004 06:59
How best can I do this?
#46
Author: Sreekanth Reddy Bandi
Date: Thu, 25 Mar 2004 06:59
13 lines
1499 bytes
Hi,

I have two datasets..DS1, DS2. DS2 has 16 cols and has about 50k rows
fetched from remote database and cached in memory using TClientDataSet.
Initially DS2 is shown to the user in the grid. DS2 contains one column(this
column is present in DS1 also) and its size varies from 1 row to few hundred
rows. On certain events, DS2 is constructed afresh. Now I would like to see
only those records of DS1 that are present in DS2 also. In other words DS1
holds details of the records held in DS2. Each time DS2 is
constructed/refreshed, I would like to see the details in DS1.

Thanks in advance,
Sreekanth
Re: How best can I do this?
#230
Author: Nick Rambarransingh
Date: Fri, 13 Aug 2004 18:27
28 lines
1832 bytes
Good Day,

  you could write something like this:

Select * from DS1
where ds1_KeyField in 
  (Select DISTINCT ds2_KeyField from DS2 order by ds2_KeyField)

HTH,
Nick

"Sreekanth Reddy Bandi" <sreekanth_reddy@persistent.co.in> wrote:
>Hi,
>
>I have two datasets..DS1, DS2. DS2 has 16 cols and has about 50k rows
>fetched from remote database and cached in memory using TClientDataSet.
>Initially DS2 is shown to the user in the grid. DS2 contains one column(this
>column is present in DS1 also) and its size varies from 1 row to few hundred
>rows. On certain events, DS2 is constructed afresh. Now I would like to see
>only those records of DS1 that are present in DS2 also. In other words DS1
>holds details of the records held in DS2. Each time DS2 is
>constructed/refreshed, I would like to see the details in DS1.
>
>Thanks in advance,
>Sreekanth
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads