Viewing 15 posts - 151 through 165 (of 3,396 total)
This works except for the "Top 4" rule, but you can do that using CROSS APPLY.
use tempdb;
go
CREATE TABLE #Diags ([ChartProcedureId] UNIQUEIDENTIFIER, [DiagnosisCodes] VARCHAR(200))
INSERT INTO #Diags ([ChartProcedureId], [DiagnosisCodes])...
February 9, 2023 at 7:52 pm
Congratulations on finding a relevant post that has the answer you need. Did you try it??
February 7, 2023 at 6:43 pm
Something like this maybe?
use tempdb;
go
CREATE TABLE Reading ( readingDate date, quantity int);
GO
INSERT INTO Reading VALUES ('02/03/2023', 170),('02/02/2023', 90),
('02/01/0223', 160);
SELECT readingDate,
quantity,
prevQty = LAG(quantity) OVER (ORDER BY...
February 4, 2023 at 6:35 pm
I would use LAG([Recordcount],1) OVER (PARTITION BY TableName ORDER BY SomeDate)
February 4, 2023 at 12:39 am
I would use LAG([Recordcount],1) OVER (PARTITION BY TableName ORDER BY SomeDate)
February 4, 2023 at 12:39 am
February 3, 2023 at 4:37 am
Make your life easier. Create a stored procedure in the database (or send the query to whoever is allowed to do it) , and then create a dataset in SSRS...
January 26, 2023 at 12:06 am
Reassemble the (date, hour, minute, second) back into a proper date and then use DATEDIFF?
Failing that, you'd have to check if ExitHour < EntryHour, and then use (24 + ExitHour...
January 25, 2023 at 3:27 pm
Sounds like you need to cross join the two tables (creates all possible combinations... be careful with these!), and then subtract out the matches. (It would help us a LOT...
January 23, 2023 at 10:06 pm
That's Oracle syntax. Are you connecting to a SQL Server database?
January 20, 2023 at 8:31 pm
Divided We Stand: The SQL of Relational Division - Simple Talk (red-gate.com)
Read the article... that's how you do it in T-SQL. In DAX, well, that's a whole other kettle...
January 20, 2023 at 1:42 am
Something like this?
SELECT CustNo, TimeAmount AS Amount, 1 AS ExpenseType FROM #P
UNION ALL
SELECT CustNo, ExpenseAmount, 2 FROM #P;
January 19, 2023 at 9:32 pm
.NET?
January 18, 2023 at 7:29 pm
Which pages??? The first N records per parent? What does "a certain number" mean?
Could you give us a quick example?
January 18, 2023 at 5:34 am
wow. for that many points, that's a pretty terrible description.
For starters, here's your code fixed up a little:
use tempdb;
GO
CREATE TABLE ReportingPeriods(
StartDate DATE NOT NULL,
EndDate DATE NOT NULL,
PeriodID...
January 11, 2023 at 2:30 am
Viewing 15 posts - 151 through 165 (of 3,396 total)