Viewing 15 posts - 601 through 615 (of 3,489 total)
It would likely depend on how the indexes on the tables in the query.
How many records are you talking about?
September 23, 2020 at 5:36 pm
without sample data, there's no way for me to tell. Screenshots show me the results of your query, but it doesn't give me any data to work with.
And what does...
September 19, 2020 at 9:34 pm
Running totals are easy if you use a windowing function. These have been around since 2012.
SELECT CustomerID,
running_total = SUM([InvoiceAmount]) OVER (PARTITION BY CustomerID ORDER BY InvoiceDate ROWS BETWEEN UNBOUNDED PRECEDING...
September 19, 2020 at 5:33 pm
Use a Calendar table?
September 19, 2020 at 1:19 am
What did you try? Something like an update against Plan using the related max from the Plan_review table?
17K points and you ask questions with no data???
September 18, 2020 at 4:40 am
I can get Python to read my database tables / run my stored stored procedures using pyodbc from Python (outside SQL Server)... I guess Python is just super flexible -...
September 17, 2020 at 8:56 pm
I've only just started Python, but trying to use Python inside SQL Server is mindboggling to me. Seems a lot cleaner and clearer if you do it from outside... connect to...
September 17, 2020 at 8:16 pm
That reminds me of a precon I went to by @SqlLocks (Jonathan Stewart). One of his cousins is color blind, so he has been interested in it for a long...
September 17, 2020 at 5:55 pm
When I click on the picture, I can't copy it into SSMS. So it won't run. So I can't help. Sorry!
You really need to read this article:
September 15, 2020 at 3:24 am
If you really want help, help us help you.
Post TEXT, not pictures. And if you're stuck on something, post what you tried. We're not here to do your homework. Ideally,...
September 14, 2020 at 11:11 pm
I don't see any way to group these so that you can use ROW_NUMBER() with a PARTITION clause. Can you explain how these are supposed to group? If you can't...
September 13, 2020 at 3:51 am
I created this measure using the allselected function.
Could you post the code for it? Something like
DIVIDE ( [Total Sales], CALCULATE([Total Sales], ALLSELECTED('Calendar'[Month])) September 12, 2020 at 7:55 pm
Thanks for the data setup... this matches your expected output...
SELECT *
FROM dbo.Sales s
INNER JOIN dbo.FiscalPeriods fp
ON s.DOCDATE>=fp.FirstDate AND s.DocDate<=fp.LastDate;
September 7, 2020 at 10:03 pm
You may create a staging table, populate it with the data from a trigger and use a job to output the data to a file.
I guess use the Inserted virtual...
September 6, 2020 at 5:56 pm
Viewing 15 posts - 601 through 615 (of 3,489 total)