Forum Replies Created

Viewing 15 posts - 61 through 75 (of 192 total)

  • Reply To: How To Avoid MERGE in SQL Server

    I agree - there is no real reason, to avoid MERGE. And if it seems to difficult to understand, you may need just some practice 🙂

    I use it very often...

    God is real, unless declared integer.

  • Reply To: Backup Directly to a GCS Bucket in SQL Server 2022

    Short question: WHY should I backup direct from my local server to cloud storage?

    Wouldn't it be much better / faster to create the backup locally and copy it to the...

    God is real, unless declared integer.

  • Reply To: The Multilingual Programmer

    • Basic
    • a tiny bit Redabas (east German version of dBase)
    • DOS batch files (wrote batch based GUI to launch my favorit tools and games)
    • Delphi
    • Cobol
    • VBA (Access); used...

    • This reply was modified 3 years, 6 months ago by Thomas Franz.

    God is real, unless declared integer.

  • Reply To: Convert UNIX Timestamps to DATE/TIMEs in SQL Server - Part#1

    @Eirikur: of course it is possible to do the calculation with bit shifting, reversing, converting to binary etc., but WHY? Just because it is possible and makes some old assembler...

    God is real, unless declared integer.

  • Reply To: Convert UNIX Timestamps to DATE/TIMEs in SQL Server - Part#1

    Very nice and informative article, but I miss one important point:

    Unix timestamps are based on the UTC timezone (this may be clear for you but not for a random junior...

    God is real, unless declared integer.

  • Reply To: Manage Your Business Rules in T-SQL Query

    I wonder, where it would really help me.

    The usual business logic (as total = amount * single_price or gross_price = net_price * (1 + tax_rate)) does not really be needed...

    God is real, unless declared integer.

  • Reply To: Data Compression Double Take

    This article was wrongly linked under the topic "Columnstore Indexes are Finally Sorted in SQL Server 2022" in the newsletter from 20th July 2022.

    I didn't find Steve Jones article with...

    God is real, unless declared integer.

  • Reply To: Randomizing the Day Inside a Month Using T-SQL

    @Emmit:

    why do you not use

    DATEFROMPARTS(YEAR(cd.BirthDate), MONTH(cd.BirthDate), ABS(CHECKSUM(NEWID())) % (DAY(EOMONTH(cd.BirthDate))) + 1) AS new_birth_date

    It would return random dates from month first to the month's last day.

    God is real, unless declared integer.

  • Reply To: Randomizing the Day Inside a Month Using T-SQL

    why should this a problem? Random is random and each rule you add reduces the "complexity". If I know, that it must not be the original birth date, there are...

    God is real, unless declared integer.

  • Reply To: Standards Matter

    Just to refer to the orginal problem:

    The root problem of the big log file could be fixed / prevented, if you would partition your tables. Ola's script would in this...

    God is real, unless declared integer.

  • Reply To: Creating Markdown Formatted Text for Results from T-SQL

    when you are working with dynamic SQL and particularly, when it uses varchar-parameters and adds it to the dynamic code, you have always to use QUOTENAME(), otherwise someone could call...

    God is real, unless declared integer.

  • Reply To: How to Delete Large Amounts of Data

    @hmbacon: you could either do 6 Updates each joining the base table or - if the select of the base table is slow / difficult - write the ids, that...

    God is real, unless declared integer.

  • Reply To: How to Delete Large Amounts of Data

    The DELETE WHERE id IN (SELECT TOP x) is still a very bad solution. You wrote that it makes a table scan in your first example, so I assume that...

    God is real, unless declared integer.

  • Reply To: Data Retention Policies, Often Forgotten

    @dave_rogers: I disagree with your "rule". It is often much easier to query a log table (even if it will be never joined to whatever) than to read / search...

    • This reply was modified 4 years, 8 months ago by Thomas Franz.
    • This reply was modified 4 years, 8 months ago by Thomas Franz.

    God is real, unless declared integer.

  • Reply To: To Inifinity and Beyond With 1=1

    ok, theoretical you could for the cursor "problem" declare an additional variable, increase it inside the loop and write a WHILE @i < 999999999 instead of 1=1

    But what, if someone...

    God is real, unless declared integer.

Viewing 15 posts - 61 through 75 (of 192 total)