Ask a Question related to Coldfusion Database Access, Design and Development.
-
shaoguan #1
how write query to get hourly rate based on multiconditions
Hi, all
I need to get hourly rate for the employee based on their job position(each
position has 3 differet rates in either year of 2004 or 2005), date worked ( in
2004 or in 2005), pay type. I have the report built with MS Access and the
query is as follows:
SELECT [LName] & ", " & [FName] AS Employee, tblTimesheet.PayType,
tblTimesheet.Hours, tblTimesheet.dateWorked, tblTimesheet.caseID,
tblPosition.position, IIf([dateWorked]>#1/26/2004#,[RE05],[RE04]) AS RE,
IIf([dateWorked]>#1/26/2004#,[OT05],[OT04]) AS OT,
IIf([dateWorked]>#1/26/2004#,[TR05],[TR04]) AS TR,
IIf([PayType]="RE",[RE],IIf([PayType]="OT",[OT],[TR])) AS HourRate,
[HourRate]*[Hours] AS SubTotal
FROM (tblEmpInfo INNER JOIN tblTimesheet ON tblEmpInfo.empID =
tblTimesheet.Employee) INNER JOIN tblPosition ON tblTimesheet.PositionID =
tblPosition.positionID
WHERE (((tblTimesheet.dateWorked) Between [forms].[frmRunRpt].[BeginningDate]
And [forms].[frmRunRpt].[EndingDate]));
Now I have created a simple query using the Coldfusion Report Query Builder
try to generate a report like the one I did with Access, but I don?t know how
to write cfquery (the IIF portion) which will get the hourly rate . Here is the
query:
SELECT tblEmpInfo.LName, tblEmpInfo.FName, tblPosition.jobPosition,
tblTimesheet.PayType, tblTimesheet.dateWorked, tblTimesheet.caseID,
tblTimesheet.Hours, tblEmpInfo.empID
FROM tblTimesheet, tblEmpInfo, tblPosition
WHERE tblTimesheet.Employee = tblEmpInfo.empID
AND tblTimesheet.PositionID = tblPosition.positionID
ORDER BY LName, FName, jobPosition, PayType
Any help will be greatly appreciated.
shaoguan Guest
-
add new nav tab based on a query
Hi, I am trying to generate a flash fourm with more then one tabs based on the result from the query. I used the repeater and all tabs come out... -
mediaplayback MP3 bit rate or sample rate supported
What bit rates / sample rates are supported by the flashMX mediaplayback object? I'm loading in mp3's on the fly by passing in the MP3's url. The... -
WEb Services that gets the Interest Rate USA (Morgage rate)
Dear All, Is there any body know the sites which offers web services for interest rate of USA , mortgage rate and any other financial information... -
10D: does CF write speed influence burst-shooting rate?
Choosing CF card(s) for my soon-to-arrive 10D. Do I need a 32X card to make the most of the burst rate (3fps/9shots) or is this irrelevant? Does it... -
How to write this query... please help!
Hi all, I can't find my way out of this little problem and my deadline is coming fast... So if someone could help me out... I have 2 tables,...



Reply With Quote

