Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Comparing Table Changes...
Thu, Feb 2 2006 12:53 PMPermanent Link

"Allan Roberts"

I am detecting changes on a dataset by loading two memory tables, Compare1
and Compare2, then allowing edits to Compare2.  I use the following query to
detect changes in the column "Qty", and it works well.


Qry3.SQL.Clear;
Qry3.SQL.Add('SELECT Compare2.Name, Compare2.Qty FROM "\MEMORY\Compare1"
RIGHT OUTER JOIN "\MEMORY\Compare2" ON ');
Qry3.SQL.Add('Compare1.Qty = Compare2.Qty WHERE Compare1.Qty is NULL');
Qry3.Open;


How can I build (append to) a third table from the query result?  I've tried
various syntaxes of SELECT INTO without success.

Thanks

Fri, Feb 3 2006 5:15 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Allan,

<< How can I build (append to) a third table from the query result?  I've
tried various syntaxes of SELECT INTO without success. >>

Do you want to open the combined result of all three tables, or do you want
to open the combined result of the first two, and then add the third in
afterwards ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Feb 3 2006 7:37 PMPermanent Link

"Allan Roberts"

Just the resultant query, which should display the only the changed
field--essentially build a list of revisions.



"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:BE990194-53EC-42E2-B75C-BC31FCF74E4F@news.elevatesoft.com...
> Allan,
>
> << How can I build (append to) a third table from the query result?  I've
> tried various syntaxes of SELECT INTO without success. >>
>
> Do you want to open the combined result of all three tables, or do you
want
> to open the combined result of the first two, and then add the third in
> afterwards ?


>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Mon, Feb 6 2006 11:25 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Allan,

<< Just the resultant query, which should display the only the changed
field--essentially build a list of revisions. >>

Okay, I've re-read your initial post and I think you simply want something
like this, correct ?

Qry3.SQL.Clear;
Qry3.SQL.Add('SELECT Compare2.Name, Compare2.Qty INTO "\MEMORY\Compare3"
FROM "\MEMORY\Compare1" RIGHT OUTER JOIN "\MEMORY\Compare2" ON ');
Qry3.SQL.Add('Compare1.Qty = Compare2.Qty WHERE Compare1.Qty is NULL');
Qry3.Open;

Then you can edit Compare3 as the query result set.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Feb 6 2006 12:01 PMPermanent Link

"Allan Roberts"
Tim,

That does it.  Thanks.


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:76C002A1-7709-427A-8597-C70F8DEE2C00@news.elevatesoft.com...
> Allan,
>
> << Just the resultant query, which should display the only the changed
> field--essentially build a list of revisions. >>
>
> Okay, I've re-read your initial post and I think you simply want something
> like this, correct ?
>
> Qry3.SQL.Clear;
> Qry3.SQL.Add('SELECT Compare2.Name, Compare2.Qty INTO "\MEMORY\Compare3"
> FROM "\MEMORY\Compare1" RIGHT OUTER JOIN "\MEMORY\Compare2" ON ');
> Qry3.SQL.Add('Compare1.Qty = Compare2.Qty WHERE Compare1.Qty is NULL');
> Qry3.Open;
>
> Then you can edit Compare3 as the query result set.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Image