Viewing 15 posts - 1,006 through 1,020 (of 7,608 total)
The best way is to use > the next day rather than <= the end day. Like this:
DECLARE @StartDate datetime
DECLARE @EndDate datetime
SET @StartDate = '18 Nov 2021'
SET...
January 27, 2022 at 6:40 pm
I would think it would be. Why not try it with a small table and see?
January 27, 2022 at 6:38 pm
SELECT DISTINCT GRPID, PLNCD, XPLNE, EXTNO, EffDate, TermDate FROM History WHERE MBRNO IN (SELECT MBRNO FROM dbo.Member_MRN_lkupAllMBRNOs(@strMBRNO)) ORDER BY EffDate ASC
How large (MB/GB) is the "History" table?
How is...
January 27, 2022 at 6:37 pm
Keep in mind that the view is being created in the same db as the proc is in. Although presumably that is what you want to do.
What does "doesn't work"...
January 27, 2022 at 4:07 pm
I'd clean up the prod problem first. You can use a backup and research to research the other stuff, if you think it's necessary.
Also, once you get the table reduced...
January 27, 2022 at 3:53 pm
Don't rely on the DB_ID() to reference a db. Assume it could change at any time.
If you'll notice, in its system tables, MS stores the db name rather than the...
January 27, 2022 at 3:49 pm
As Jeff noted, you should be able to do this with dynamic SQL.
But be aware that you cannot have any GO statements in the code. Just the main statement itself:
CREATE...
January 27, 2022 at 3:25 pm
SELECT C1
FROM #Base
WHERE C2 IN ('122', '123')
GROUP BY C1
HAVING SUM(CASE WHEN C2 = '123' THEN 1 ELSE 0 END) > SUM(CASE WHEN C2 = '122' THEN 1...
January 27, 2022 at 3:22 pm
Jeff,
You're right this is not ok. Just this morning I alse remembered myself, I have some scenes implemented, which are turning off particular lights even if the light are...
January 26, 2022 at 6:18 pm
It doesn't matter if the 'on' is followed by 'on' or 'off', just add up all the 'on' times.
It actually does matter because two on times without an...
January 26, 2022 at 6:13 pm
If Member_MRN_lkupAllMBRNOs is a multi-statement table-valued user-defined function, that alone is going to cause pretty massive performance heads. Either switch it to being an in-line function, or eliminate the...
January 26, 2022 at 6:07 pm
It doesn't matter if the 'on' is followed by 'on' or 'off', just add up all the 'on' times.
;WITH cte_switches_with_next_time AS (
SELECT friendlyName,...
January 25, 2022 at 9:44 pm
I provided the exact command to do that in my earlier code.
January 25, 2022 at 9:22 pm
That's a lot of images at one time. I suggest starting at 10K or even 5K and see how that goes first.
Btw, be sure to use sp_tableoption before UPDATEing the...
January 25, 2022 at 7:32 pm
I kinda wondered why the column data needed to have 'MB' in it when the column name said 'MB'?!
January 25, 2022 at 3:49 pm
Viewing 15 posts - 1,006 through 1,020 (of 7,608 total)