I have a table in mysql with two columns start date and end date. and i have a search option where i can input the dates and search for it. the textbox could be empty so i have used the isnull function.right now the functionality which i have implemented is that we have to enter the exact start date and end date then only the value would be returned.I would like to return the data which falls between the start date and enddate
following is the code in the stored procedure.
FROM Promo_ODM_ShipWithout
WHERE
StartDate LIKE ISNULL(@StartDate,StartDate)
AND ISNULL(EndDate,-1) Like ISNULL(ISNULL(@EndDate,EndDate) ,-1)
AND SKUCode Like ISNULL(@SkuCode,SKUCode)
ORDER BY Id
)RowSet
WHERE ROW_NUM >@LeftStart
1 Answer