Viewing 15 posts - 31 through 45 (of 198 total)
I don't see the need for this undocumented command for this case (attaching a file). In reality it would cause more problems that it solves.
The command for attaching a database...
God is real, unless declared integer.
January 27, 2025 at 4:45 pm
Are now bots commenting and praising an AI generated article?
For the sake of completnes in SQL 2019 you can use STRING_AGG() to aggregate the text of multiple lines - something...
God is real, unless declared integer.
January 3, 2025 at 9:29 pm
@Snehalatha Mannar: LEFT(), RIGHT(), SUBSTRING(), REPLACE(), CHARINDEX() and combining strings by adding them is part of every ANSI-SQL-Standard compatible language, so you can use them to do easily what STUFF()...
God is real, unless declared integer.
January 3, 2025 at 1:27 pm
Someone seems to know, how to ask a KI for a full explanation with examples for an SQL function...
If this would be a manual written article, you would have realized...
God is real, unless declared integer.
January 3, 2025 at 9:12 am
In the praxis you want to rename the files / folder too, since it is usually very inconsistent to have a database ArchiveSales with OldSales.mdf / ldf
Therefore for a clean...
God is real, unless declared integer.
November 27, 2024 at 1:27 pm
Most servers have autopatching enabled and assigned to different groups that defines on which weekday at which hour they are allowed to restart.
Some servers (as our SQL Servers) are patched...
God is real, unless declared integer.
November 18, 2024 at 1:55 pm
when I cast the values as VARBINARY(MAX) it works too.
TRUNCATE TABLE dbo.Image_Staging; TRUNCATE TABLE dbo.Images
INSERT INTO dbo.Images (imageid, imagestatus, imagemodified, imagebinary) VALUES (1, 1, GETDATE(), HASHBYTES('SHA2_512',...
God is real, unless declared integer.
November 11, 2024 at 9:30 am
Bad style of the query (I know, it is intended here, but you should never write it this way in real code).
Instead of
SELECT
c.CustomerName, COUNT(oh.OrderID)
...
God is real, unless declared integer.
November 6, 2024 at 12:17 pm
Nice solution.
Instead of combining LAG() and SUM() OVER you could have used just LAG - at least when it are just a fixed number of the last 4 entries. For...
God is real, unless declared integer.
September 30, 2024 at 4:11 pm
Producing a Year-2100-problem by setting 31.12.2099 as default valid_to date. Ensures the job for my great-grandkids or their AI.
God is real, unless declared integer.
September 21, 2024 at 12:34 pm
Sorry, but this script isn't really good in my opionion.
God is real, unless declared integer.
September 1, 2024 at 11:58 am
At a previous employer we used partition switching to do massive deletes.
when you already have partitions, you could simply do a
TRUNCATE TABLE dbo.big_stuff WITH (PARTITION(1 TO...
God is real, unless declared integer.
August 30, 2024 at 3:28 pm
I just wonder how this even could happen. Did all the companies not install the patches on the testing / dev environment before? And do they not have a cluster...
God is real, unless declared integer.
July 22, 2024 at 7:45 am
the problem is, that DATETIME is not an exact datatype (similar to float vs. decimal). DATETIME suppots only about 0.003 accuracy, so a DATETIME2 = '20240708 23:59:59.998' would be converted...
God is real, unless declared integer.
July 8, 2024 at 8:52 pm
The two statements in the chapter More details of JOINs are equal.
And both are wrong, since you need to put the SUM(o.Amount) > 1000 into the HAVING and not the...
God is real, unless declared integer.
July 8, 2024 at 8:20 am
Viewing 15 posts - 31 through 45 (of 198 total)