SELECT ORDER_NO, SUBSYSTEM, PRODUCT_CODE, INVOICE_DATE, CYCLE_BEGIN_DATE, CYCLE_END_DATE, RATE_STRUCTURE, RATE_CODE, LINE_STATUS_CODE, FULFILL_STATUS_CODE,
WHERE (SUBSYSTEM = 'MBR') AND (PRODUCT_CODE LIKE 'SOC%') AND (CYCLE_BEGIN_DATE = CONVERT(DATETIME, '2017-01-01 00:00:00', 102)) AND (RATE_CODE = 'RENEW')
I need to create a store procedure for crystal report with two parameters CycleBeginDate and Invoice date. Above query results for only 2017 year. Members will be given membership every year. Even user entered dates like middle of month, it should give members till that date.