Viewing 15 posts - 4,591 through 4,605 (of 59,069 total)
This is a bit like saying I have something that I want to store in the pantry. What type of container should I use?
What does the data you're trying to...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2021 at 4:19 pm
With the understanding that I've never tried it before, have you tried using EXEC?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2021 at 4:12 pm
Ran into an issue that caused me some issues. It seems that when I backup a database that is in FULL recovery mode and restore it to a different...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2021 at 4:04 pm
Although sometimes unavoidable, killing sessions is actually a pretty dangerous thing to do in SQL Server. Killing sessions automatically is about 3 times worse.
Prevention and privs control is the best...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2021 at 3:53 pm
Hello,
In my application, with a DB running on SQL Server 2012, I've got a job (scheduled task) that periodically executes an expensive query and writes the results to a...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 8:16 pm
Yep, and when I look over both documents, they seem in some ways contradictory. The problem is that TABLOCK can lock up other metadata things in the db, so...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 8:09 pm
Almost sounds like they may be already attached.
+1000 Either that OF he has an explorer window open and maybe has even clicked on one of the files OR he...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 8:05 pm
Table IndexesRows in table Hints With or Without TF 610...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 5:08 am
solved!
1st friday : (SELECT DATEADD(DAY, DECODE(EXTRACT(DOW FROM START_DATE), 0,5, 1,4, 2,3, 3,2 ,4,1, 6,6, 0), START_DATE) third_friday FROM (SELECT date_trunc('month',current_date) START_DATE))
2nd friday : (SELECT DATEADD(DAY, 7 + DECODE(EXTRACT(DOW FROM...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 4:44 am
Practically, methods like that work just fine. Technically, it bugs me because the "Tally" sequence generator had to build 366 values and then were filtered out to just 12 quite...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 1:43 am
As you said, the Order By will be ignored if it's not needed. It costs nothing to include it just to be sure.
As for TABLOCK not being required, the 2nd...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 22, 2021 at 1:27 am
Heh... Wecome aboard but... "Must Look Eye!"
You've posted what looks like Oracle code in an SQL Server forum and it's not going to work in SQL Server.
On a...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2021 at 10:58 pm
Can you post your code, Scott?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2021 at 10:53 pm
Fwiw in 2021. In the FROM clause use dbo.fnTally and CROSS APPLY (both twice) to hierarchically generate the first 7 days of each month. Then in the WHERE clause...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2021 at 9:16 pm
solved!
1st friday : (SELECT DATEADD(DAY, DECODE(EXTRACT(DOW FROM START_DATE), 0,5, 1,4, 2,3, 3,2 ,4,1, 6,6, 0), START_DATE) third_friday FROM (SELECT date_trunc('month',current_date) START_DATE))
2nd friday : (SELECT DATEADD(DAY, 7 + DECODE(EXTRACT(DOW FROM...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2021 at 6:43 pm
Viewing 15 posts - 4,591 through 4,605 (of 59,069 total)