Report writing

I am trying to write a report, i have a if then and select syntax.

Does anybody know the correct code for the tmcdln.crtfid table/column

I want the report to be able to select sum from the tmcdln.hrswrk based on a y in the tmcdln.crtfid column.

using y, yes, Y, Yes, YES, "Y", 1, none of these are recognized. Any help will be appreciated. 

  • 0

    Good morning, Ryan, Hope you are enjoying using my book. You should feel comfortable asking me directly these types of questions. On your question: Usually 1 = Y (or Yes). However, you are asking for the "sum". You may need to be using the SQL statement to get this (SELECT, FROM, WHERE) rather than the IF, THEN, ELSE type. Please reach out to me as this can be complicated and requires more discussion. Regards, Jim Schuett

  • 0

    Jim is a terrific source for reports.  I agree that the SQL approach, with a SELECT Sum() approach is probably better.  The tmcdln.crtfid actual data is Y or N or Blank.  You might need to use single quotes around the Y (like 'Y') in the WHERE section of the calculation.