Search results

  1. S

    Using a summed field to calculate another field

    I have the following query SELECT COSTCENTRES.GROUP, Corp1.COSTCENTRE, COSTCENTRES.RESP_DESC, AbsenteeismTable.EMP_ID, AbsenteeismTable.NAME, Corp1.GRADE_DESC, Corp1.EMPLOYMENT, Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN FROM (Corp1 INNER JOIN COSTCENTRES ON Corp1.COSTCENTRE =...
  2. S

    selecting fields from a subquery to be included in the main query

    Hi How do I get the subquery T1.CODE value to be displayed as part of the main query? Thanks heaps SELECT CopyTIMEENTRY.TCT, tblPayrollOfficers.TCTNAME, CopyTIMEENTRY.EMP_ID, CopyTIMEENTRY.NAME, CopyTIMEENTRY.TRANSDATE, CopyTIMEENTRY.CODE FROM tblPayrollOfficers INNER JOIN CopyTIMEENTRY ON...
  3. S

    Using IIF function in the ORDER BY statement in a Query

    I came across the following syntax in a query ORDER BY TEST.EMP_ID, IIf(IsNull([ETPSTARTDATE]),[DATE_HIRE],[ETPSTARTDATE]); Appreciate if someone can explain to me how this works, with examples. I was unaware that you could do this. Thanks heaps sample data EMP_ID DATE_HIRE ETPSTARTDATE...
  4. S

    Query Syntax explaination

    Hi all. Appreciate if someone can tell what the following syntax in a SQl statement is doing and how it actually works...
Back
Top Bottom