Hello,
I am working with something that for a while ago saw to be an easy job, but now I have used most of the day trying to solve this problem. I have tryed all around me that I thought could help me whitout any luck. So now I have to try you folks out there.
I have two tabels called pricelist, and Production.
The pricelist has those colomns
-Company
-Facility
-Item number
-Costing date from
-Costing date to
-Costing sum 1
The production table contains:
-Company
-Facility
-Product number
-Component number
-Start date
-Transaction quantity basic unit
-Transaction price
Where
[pricelist].[Company]=[production].[Company]
[pricelist].[Facility]=[production].[Facility]
[pricelist].[Item number]=[production].[Component number]
So far so good, and here it all stops.
Is there anyone out there who can tell me how I can use the [Start date] go into the pricelist between [Costing date from]
and [Costing date to] take the [Costing sum 1] and put it into the [Transaction price].
I have tryed the:
CASE WHEN [Start date] BETWEEN [Costing date from] AND [Costing date to]
THEN [Costing sum 1]
ELSE NULL (or skipping this Else clase)
END
This worked in a way when the price came OK into the right date, but the rest was set to NULL but when the priceslit has 120 000 records and the production table has 1 000 000 records, it wasn't possible to use the nice result i got.
So no I hope there is someone out there who can help me with this problem.
Thanks
Stig
I am working with something that for a while ago saw to be an easy job, but now I have used most of the day trying to solve this problem. I have tryed all around me that I thought could help me whitout any luck. So now I have to try you folks out there.
I have two tabels called pricelist, and Production.
The pricelist has those colomns
-Company
-Facility
-Item number
-Costing date from
-Costing date to
-Costing sum 1
The production table contains:
-Company
-Facility
-Product number
-Component number
-Start date
-Transaction quantity basic unit
-Transaction price
Where
[pricelist].[Company]=[production].[Company]
[pricelist].[Facility]=[production].[Facility]
[pricelist].[Item number]=[production].[Component number]
So far so good, and here it all stops.
Is there anyone out there who can tell me how I can use the [Start date] go into the pricelist between [Costing date from]
and [Costing date to] take the [Costing sum 1] and put it into the [Transaction price].
I have tryed the:
CASE WHEN [Start date] BETWEEN [Costing date from] AND [Costing date to]
THEN [Costing sum 1]
ELSE NULL (or skipping this Else clase)
END
This worked in a way when the price came OK into the right date, but the rest was set to NULL but when the priceslit has 120 000 records and the production table has 1 000 000 records, it wasn't possible to use the nice result i got.
So no I hope there is someone out there who can help me with this problem.
Thanks
Stig