Viewing 15 posts - 226 through 240 (of 6,036 total)
How many records returned if you remove TOP 1?
You ask to return the only one record with the smallest Lin.id from the entire record set.
To find that record the engine...
_____________
Code for TallyGenerator
December 7, 2020 at 8:26 pm
The ANSI/ISO standards specify an extra clause that goes after the order of the sort (ASC | DESC) which will let you decide the order of the...
_____________
Code for TallyGenerator
December 7, 2020 at 8:12 pm
The case expression returns a value of a particular data type. In your example, you're sorting on a numeric, without regard to what the original column was. This would...
_____________
Code for TallyGenerator
December 7, 2020 at 7:57 pm
The ANSI/ISO standards specify an extra clause that goes after the order of the sort (ASC | DESC) which will let you decide the order of the nulls within...
_____________
Code for TallyGenerator
December 7, 2020 at 1:55 am
A good Application developer would define the connection string in a file, say config.xml, which is used by every instance of the application when it starts. Then when it's time...
_____________
Code for TallyGenerator
December 6, 2020 at 11:31 pm
A covering index with Status column first followed by OrderDate is inevitably a subject of severe page splits on every ongoing INSERT's. Very soon during normal operation the index will...
_____________
Code for TallyGenerator
December 4, 2020 at 12:18 pm
7 lakhs per day is not a number for a SQL Server.
i regularly perform performance tests, when 10 mil records are inserted into some table. And if it takes an...
_____________
Code for TallyGenerator
December 3, 2020 at 1:28 pm
What indexes do you have on the table "Cuentas"?
_____________
Code for TallyGenerator
December 1, 2020 at 7:31 pm
Look at the last script from my post.
It allows to the function against all the dates you can possibly get.
in between the brackets at CROSS APPLY (...) T2 you can...
_____________
Code for TallyGenerator
December 1, 2020 at 8:02 am
Yes, that’s what was the point of the function - provide convenience with minimal impact on performance.
actually, overall performance may benefit from using carefully crafted code within the function, comparing...
_____________
Code for TallyGenerator
December 1, 2020 at 5:13 am
Here is another approach, looks a bit cleaner to me.
But that's, again, - to me.
Starting from obvious:
Declare @Today datetime
set @Today = GETDATE()
Finding the number of months since...
_____________
Code for TallyGenerator
December 1, 2020 at 2:52 am
Thank Jeff, you managed to stop on the triple dots sign. Good on you. I'm not sure I could do it so nicely. 😉
but I'm still not sure the OP...
_____________
Code for TallyGenerator
November 26, 2020 at 3:31 am
This query would perform much better, considering there is an index on WeekDate:
SELECT Top(1) ID FROM Weeks
WHERE
WeekName <> 'ALL'
AND
WeekDate, >= CONVERT(datetime, @CurrentDate, 103))
order by WeekDate DESC
_____________
Code for TallyGenerator
November 26, 2020 at 1:15 am
From the memo:
it is most important to ask not just for objections to a particular proposal,
but for the nature of those objections.
This indicates the case of uneven play field.
Objections need...
_____________
Code for TallyGenerator
November 25, 2020 at 1:51 am
"At times of high scientific controversy, the consensus is always wrong."
Albert Einstein (? - not sure)
_____________
Code for TallyGenerator
November 25, 2020 at 1:24 am
Viewing 15 posts - 226 through 240 (of 6,036 total)