Viewing 15 posts - 241 through 255 (of 1,219 total)
Well, FETCH is also an SQL statement.
Apparently this is a cursor set up in the API, and I will have to admit that I don't know how to find the...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 9, 2019 at 5:58 pm
So here is a lesson for you: If you want to be spoonfed a working solution, you should include a CREATE TABLE script for your table and INSERT statements with...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 8, 2019 at 8:14 am
A correct observation Jeff, but since Briceton did not care to include anything else, I had to assume that the Transaction date is unique. If it is not, well, then...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 7, 2019 at 9:39 pm
On SQL 2012 and later:
WITH CTE AS (
SELECT AccountNumber, TxtAmount, PrevAmount = LAG(TxnAmount) OVER (PARTITION BY AccountNumber ORDER BY TransactionDate), TransactionDate
...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 6, 2019 at 10:16 pm
I have a short article on my web site on this topic: Arrays and Lists in SQL Server.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 3, 2019 at 8:20 pm
Planned restarts twice a month? Well, sp_cycle_errorlog twice should be enough.
There is no setting for this. You can set how many errorlog files to retain, I believe, but there is...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 2, 2019 at 8:53 pm
I am not sure that Developer Edition is applicable here. Jack the Cat talks about doing analysis of data. That smells production to me. And Developer Edition is not licensed...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 1, 2019 at 6:40 pm
No, that is not possible.
But you can download and install of Express Edition, which is free, to your laptop.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 30, 2019 at 8:54 pm
I agree with Chris. The query requires two indexes: one for (Column3) INCLUDE (Column2, DateTime) and one for (Column2, DateTime). The first index is required to satisfy the condition Column3...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 16, 2019 at 6:28 pm
Look at my verbal description. We want to find rows with a the same value in Column2 and where DateTime is bigger the ours. Thus, both columns need to be...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 16, 2019 at 11:08 am
I think you need to find the person or vendor responsible for this query. Trying to tune an incorrectly written query is an uphill battle.
You should be able to get...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 16, 2019 at 10:04 am
Before we start to talk about tuning, I like to check a more basic thing. Are you perfectly confident that the query is returning the correct result? My interpretation of...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 16, 2019 at 9:34 am
You will typically not find calls to these sps in directly in application code, but they are generated under the covers by the client API with certain settings.
I am not...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2019 at 7:40 am
With sample data, CREATE TABLE etc it is difficult to test.You can't expect to get working queries, but you get something to work from.
Did you try putting a SELECT before...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 12, 2019 at 2:01 pm
One advantage of having the table is that you keep the data (the account mapping) apart from the logic. But admittedly, if you have to enter new accounts manually by...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 10, 2019 at 6:24 pm
Viewing 15 posts - 241 through 255 (of 1,219 total)