
Create Procedure CMTSPCasesByWorkstream AsBEGIN
DECLARE @paramdateincrement int = 24 DECLARE @paramstartdate datetime = Cast((Cast(dateadd(day,-7,cast(getdate() as Date)) as varchar) + ' 23:59:59') as Datetime) -- 'yyyy-mm-dd hh:mm:ss' Declare @startdate datetime = @paramstart_date
IF OBJECTID('tempdb..#reportdata','u') IS NOT NULL BEGIN Drop Table #report_data Print 'Table Dropped' END
[DECLARE @paramdateincrement int = 24 DECLARE @paramstartdate datetime = Cast((Cast(dateadd(day,-7,cast(getdate() as Date)) as varchar) + ' 23:59:59') as Datetime) --'yyyy-mm-dd hh:mm:ss' Declare @startdate datetime = @paramstart_date]
can u please explain sentences which r in brackets
its working for one day only ,if i open on another day the data is not fetching

Hi Friend,
Please visit the following code:
http://www.roseindia.net/mysql/mysql5/stored-procedures-and-functions.shtml
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.