Culwatrnca11
asked on
Code to run for Last full month, not current month in Crystal and also what would be code for Teradata.
Want to schedule a report in crystal and would like to run for previous full month. How do you modify this line so that it always runs for previous full month. Report will be ran on 8th day of each month for the previous Full month.
CAST (pat_enc.contact_date AS DATE) BETWEEN '2017-08-01' AND '2017-08-31'
CAST (pat_enc.contact_date AS DATE) BETWEEN '2017-08-01' AND '2017-08-31'
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try it this way
{Command.APPT_STATUS_C} = 2 and
{Command.BENEFIT_GROUP} startswith ["PROVPREV", "SURGCOLO"] and
{Command.CPT_CODE} startswith ["44388", "44389", "44392", "44393", "44394", "44401", "45300", "45305", "45308", "45309", "45315", "45320", "45330", "45331", "45333", "45338", "45346", "45378", "45380", "45383", "45384", "45385", "45388", "74261", "74262", "74263", "G0104", "G0105", "G0106", "G0120", "G0121", "G6019", "G6024"]
AND Date({pat_enc.contact_date }) in LastFullMonth
mlmcc
{Command.APPT_STATUS_C} = 2 and
{Command.BENEFIT_GROUP} startswith ["PROVPREV", "SURGCOLO"] and
{Command.CPT_CODE} startswith ["44388", "44389", "44392", "44393", "44394", "44401", "45300", "45305", "45308", "45309", "45315", "45320", "45330", "45331", "45333", "45338", "45346", "45378", "45380", "45383", "45384", "45385", "45388", "74261", "74262", "74263", "G0104", "G0105", "G0106", "G0120", "G0121", "G6019", "G6024"]
AND Date({pat_enc.contact_date
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Came up with my own solution but I am still awarding points based on both experts assisting in trying to solve my issue because I really appreciate the effort. Thank you for your time..
ASKER
{Command.APPT_STATUS_C} = 2 and
{Command.BENEFIT_GROUP} startswith ["PROVPREV", "SURGCOLO"] and
{Command.CPT_CODE} startswith ["44388", "44389", "44392", "44393", "44394", "44401", "45300", "45305", "45308", "45309", "45315", "45320", "45330", "45331", "45333", "45338", "45346", "45378", "45380", "45383", "45384", "45385", "45388", "74261", "74262", "74263", "G0104", "G0105", "G0106", "G0120", "G0121", "G6019", "G6024"]