Viewing 15 posts - 1 through 15 (of 1,447 total)
Something like this ...
WITH cteWindows AS (
SELECT c.MonthStart
, windowStart = DATEADD(mm, -2, c.MonthStart)
...
February 28, 2025 at 2:55 pm
Something like this ...
DECLARE @StartOfCurrentWindow date = '2024-10-01';
DECLARE @StartOfNextWindow date = DATEADD(MONTH, 3, @StartOfCurrentWindow);
WITH cteBase AS (
SELECT c.MonthStart
...
February 28, 2025 at 1:08 pm
Congratulations @jeff-moden Finally overtook the high priestess on the SSC overall leaderboard.
She did have a shedload of LIKEs. The "upgrade" on the site years ago hasn't...
February 20, 2025 at 5:26 am
Congratulations @jeff-moden
Finally overtook the high priestess on the SSC overall leaderboard.
February 19, 2025 at 9:00 am
Come on @jeff-moden. One more post ....
February 17, 2025 at 1:20 pm
SELECT DISTINCT tp.client_id AS Member_ID
, tp.PaidDate AS Paid_Date
, tp.DOS
FROM #ins_temp tp
WHERE (@dateChoice = 'Paid_Date' and tp.PaidDate...
January 24, 2025 at 9:51 am
You could use dynamic SQL
DECLARE @SQL nvarchar(MAX);
SELECT @SQL = N'
SELECT DISTINCT
Member_ID = tp.client_id
...
January 24, 2025 at 6:09 am
This is a similar query that might perform differently. You need to test
SELECT i.ItemID
, i.ItemName
...
January 22, 2025 at 11:52 am
It is difficult to design any queries without knowing anything about your tables and their indexes.
That said, this might help.
SELECT i.ItemID
, i.ItemName
...
January 22, 2025 at 11:44 am
You could do something like this
SELECT src.AssessmentCode, src.AssessmentDescriptio, m.Mark
FROM YourSchema.YourTable AS src
CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) AS m(Mark)
January 22, 2025 at 11:34 am
Based on your provided sample data, this query will produce the correct result.
WITH cteCrossTab AS (
/* Use a Cross-Tab query to get the data in...
January 17, 2025 at 9:57 am
Based on your provided sample data, this query will produce the correct result.
WITH cteBase AS (
SELECT t0.*, rn = ROW_NUMBER() OVER (PARTITION BY t0.uniqueid, t0.[level]...
January 16, 2025 at 9:44 am
Without test data we are just guessing.
Maybe this will do the trick
DECLARE @SearchDate date = CONVERT(date, '12/29/2024', 101);
SELECT *
FROM DueDates
WHERE CONVERT(date, textDate , 1) > @SearchDate
ORDER BY...
January 1, 2025 at 5:18 am
Maybe your "date" needs quotes
CONVERT(date, textDate , 1) > CONVERT(date, 'mm/dd/yy', 1)
January 1, 2025 at 4:43 am
You can convert it to a date/datetime with
CONVERT(date, '12/31/24', 1)
December 31, 2024 at 4:44 pm
Viewing 15 posts - 1 through 15 (of 1,447 total)