Viewing 15 posts - 586 through 600 (of 8,760 total)
So, although my prev code produced the correct results, it was clunky at best. Here is a cleaned up version of the code
CREATE FUNCTION dbo.MonthStartEnd( @DateInMonth...
June 3, 2019 at 12:53 pm
Finding this a bit amusing,Β "The criteria is that if the 1st of the Month is a Monday then use that Date otherwise use the last Monday of the previous...
June 2, 2019 at 5:43 pm
This should do, short and simple π π
USE TEEST;
GO
SET NOCOUNT ON;
GO
DECLARE @MYDATE DATE = '20190101';
;WITH TDATES AS
(
SELECT DATEFROMPARTS(
...
June 2, 2019 at 7:38 am
Hello, What is a good design to store unit of measures ? We have a measure dimension with all the measures and we are building a scorecard fact table...
June 1, 2019 at 5:32 pm
This should do, short and simple π
π
USE TEEST;
GO
SET NOCOUNT ON;
GO
DECLARE @MYDATE DATE = '20190101';
;WITH TDATES AS
(
SELECT DATEFROMPARTS(
DATEPART(YEAR,@MYDATE)
...
June 1, 2019 at 5:03 pm
It's mysql command line shell output. mysql -u USERNAME -pPASSWORD use mydb; select * from TABLENAME; Β
Your post is a little baffling, no relation to the OP!
π
Further, for any...
June 1, 2019 at 4:20 pm
So after the above comments, it's now a giant CASE statement. Β
This to me, just like Jason said earlier, looks like a perfect case for a set based trigger
π
Further...
May 29, 2019 at 2:43 pm
Good stuff and thanks for the feedback!
π
Has the storage team provided any evidence on PURE STORAGE ARRAYΒ efficiency and edge over the native SQL Server data compression? Would be very...
May 28, 2019 at 1:44 pm
Depending on the table structure and the business requirements, I would go for almost anything but a scheduled job, can you please share more details?
π
May 28, 2019 at 1:40 pm
The answerΒ is simple, just alter the table and set compression = NONE
π
Quick question, have you seen any evidence supporting this claim? "Better at the job" does not necessarily mean...
May 28, 2019 at 1:35 pm
That is just what you need on a Friday π
π
May 17, 2019 at 2:12 pm
Maybe not the best query, but here's a test. Query embedded in the --ACT section.
CREATE OR ALTER PROCEDURE tsqltests.[test calendarsales]
AS
BEGIN
---------------
...
May 6, 2019 at 8:36 am
My guess would be that the cost for parallel is set too low and the non UDF query is running with a parallel plan, the UDF version does not run...
April 24, 2019 at 12:43 pm
April 23, 2019 at 2:16 pm
Here is a quick example
π
USE TEEST;
GO
SET NOCOUNT ON;
DECLARE @TSTR VARCHAR(50) = '.....SSMS.....';
SELECT
STUFF(@TSTR,1,PATINDEX('%[^\.]%',@TSTR) - 1,'') AS TRIM_LEFT
,LEFT(@TSTR,(1 + DATALENGTH(@TSTR) -...
April 23, 2019 at 11:32 am
Viewing 15 posts - 586 through 600 (of 8,760 total)