J
jvdn
Hi,
I have a set of 3 tables that are related.
The first table is a summary.
due to performance I have to change the columns in the summary table.
With data from the 2 other tables.
the primary key of the summary table is referenced from both other
tables.
I have added the columns to the summary table
What i have to do is to update the data by using min/ max function on
columns of the first of the two other tables.
And a sum on two columns of the second of the other tables.
Like:
UPDATE Table1 set StartTime = (Select min(Table2.StartTime) where
Table1.Id = Table2.Id Group By Table2.Id) ;
Or something like that.
I can't use code to achieve this I need to solve it in SQL no VB or
Extern C,C++ C# is posible.
I hope that my problem is clear.
Regards
jvdn.
I have a set of 3 tables that are related.
The first table is a summary.
due to performance I have to change the columns in the summary table.
With data from the 2 other tables.
the primary key of the summary table is referenced from both other
tables.
I have added the columns to the summary table
What i have to do is to update the data by using min/ max function on
columns of the first of the two other tables.
And a sum on two columns of the second of the other tables.
Like:
UPDATE Table1 set StartTime = (Select min(Table2.StartTime) where
Table1.Id = Table2.Id Group By Table2.Id) ;
Or something like that.
I can't use code to achieve this I need to solve it in SQL no VB or
Extern C,C++ C# is posible.
I hope that my problem is clear.
Regards
jvdn.