Viewing 15 posts - 1 through 15 (of 167 total)
It works inside the sp. Thank you.
March 8, 2022 at 10:39 pm
No. Outside. I created a table, inserted one record and then tried to run:
IF EXISTS(SELECT 1 FROM dbo._proc_control_table WHERE Proc_Name = 'sp_Populate_NEW_NEW')
BEGIN
RAISERROR('This proc is already running, please wait for it...
March 8, 2022 at 10:29 pm
Scott,
I tried this code, however have an error for RETURN -1:
Msg 178, Level 15, State 1, Line 6
A RETURN statement with a return value cannot be used in this context.
Advice?
March 8, 2022 at 10:20 pm
Thanks a lot ...
March 8, 2022 at 8:19 pm
Scott, just naïve question (you know I'm not a guru ... so far) in your code the code to halt the sp execution is missing ... after we did all...
March 8, 2022 at 8:05 pm
Thank you ... We will try it ...
March 8, 2022 at 3:47 pm
This is the code from Suprotim Agarwal - another use of recursive CTE
DECLARE
@StartDate DATETIME,
@EndDate DATETIME
SELECT
@StartDate = '01 Jan 2019',
@EndDate = '31 Dec 2019'
-- Populate CTE with the 1st date of...
May 30, 2019 at 8:42 pm
Sorry it does not load .sql
May 30, 2019 at 7:42 pm
I'm using recursive CTE (see attached) to create a lookup table.
May 30, 2019 at 7:39 pm
December 19, 2018 at 10:19 am
Base table ED_Table: Just one clustered.
For calculations:
vw_ED_Time_Calc
December 19, 2018 at 9:36 am
Each column has its own median.
December 19, 2018 at 8:53 am
Sorry, I tried to attach .sql
December 19, 2018 at 8:36 am
Viewing 15 posts - 1 through 15 (of 167 total)