Viewing 15 posts - 4,051 through 4,065 (of 59,067 total)
How do we add leap years in the following query along with the month of February?
CASE WHEN SUBSTR(RELEASE_DATE,1,4)<1900 OR SUBSTR(RELEASE_DATE,1,4)>9999 THEN '1900-01-01' WHEN SUBSTR(RELEASE_DATE,6,2)>12 THEN '1900-01-01' WHEN SUBSTR(RELEASE_DATE,9,2)>31 THEN...
January 15, 2022 at 5:05 pm
So, JaybeeSQL... enquiring minds want to know... why have you essentially deleted several posts with no explanation? You made the lessons taught in each post that follows one of your...
January 15, 2022 at 4:53 pm
Instead of using a CASE expression (as you were trying) - or stacked OR's: WHERE @mDepth > iif(@tDepth = 0, -1, @tDepth)
Consider: @mDepth >= 0 is equivalent to...
January 15, 2022 at 4:46 pm
Nice article, Kathi.
Your description of "Some of the most problematic T-SQL code I’ve seen" is a perfect description for simple "RBAR".
And, I agree with Rick. The way SQL is taught...
January 15, 2022 at 4:17 pm
Still no notification emails - at least I have not received any.
Same here as of this instant.
January 14, 2022 at 11:28 pm
Like I said earlier, the trouble with doing a single big shrink is you have no way of telling how far it's gone nor how much is left to do. ...
January 14, 2022 at 4:41 am
@Ant-Green thank you for the tip.
The code:
-- Shrink the mdf file.
DBCC SHRINKFILE(N'FileName', 0, TRUNCATEONLY);
GO
After one of the replies I decided to shrink database (not file), using...
January 13, 2022 at 12:30 am
I am trying to copy MDF and LDF file from one server to another.
Initial On primary the DB was on C drive and on new server I was trying...
January 13, 2022 at 12:09 am
To be honest, I've never used such monitoring tools even before the compromise. I've always been fearful of such tools because of they all insist that they need such high...
January 13, 2022 at 12:05 am
You've been here for more than 12 years. Please learn how to post code in a code window so that it's easier to read. Here's the key when you're creating...
January 12, 2022 at 11:46 pm
"It Depends", Joe. Why recalculate something perhaps thousands of times per day if the answer isn't going to change that day? It's called "caching" and it's a time honored method...
January 12, 2022 at 11:32 pm
>> I got a table with 5 integer columns and one varchar(100) column. <<
Where is the DDL? I guess you want us to do everything for you , including...
January 12, 2022 at 11:07 pm
Also, please check to see if you got an email about me responding on this thread.
January 12, 2022 at 6:09 pm
Testing the code window and paste from firefox... you can ignore this post...
Code Window and paste
-- Edit test here
DROP TABLE IF EXISTS #Result
GO
CREATE TABLE #Result(
EmpNr nvarchar(10) NOT...
January 12, 2022 at 5:45 pm
Heh... I just went to the thread to post a point so people knew and the toolbar seems to have come back. What was cool was it actually took me...
January 12, 2022 at 5:41 pm
Viewing 15 posts - 4,051 through 4,065 (of 59,067 total)