Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OK, another one
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01374859
Message ID:
01375336
Vues:
18
>>Your numbers are wrong for the month of March (and I believe November)
>>
>>Remember that we want to know, after the fact, what was paid out at the time.
>>
>>
>>-- Employee gets a three month review on 3-24, gets a raise to 25.00, effective 4-1
>>INSERT INTO WorkerRates VALUES (1,'4-1-2008','3-24-2008', 25.00)
>>
>
>Is this logic correct?
>
>TimeSheets.WorkDate >= (CASE WHEN WorkerRates.RateEffectiveDate > WorkerRates.RateAddedDate THEN WorkerRates.RateAddedDate ELSE WorkerRates.RateEffectiveDate END)
>
>I have some hard time figuring date logic...

Or it should simply be

TimeSheets.WorkDate >=WorkerRates.RateEffectiveDate and TimeSheets.WorkDate >=WorkerRates.RateAddedDate

Let's try with this adjustment.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform