Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 59,066 total)

  • Reply To: Append MMYYYY to File to Copy

    Jason A. Long wrote:

    I don't see where anyone has already said it, so I'll say it… “MMYYYY” is a date format to avoid. Using “YYYYMM” instead will allow you to actually sort...

  • Reply To: SQL Query

    Steve Collins wrote:

    If performance is a requirement then yes it could be refactored

    Understood.  For me, performance is 2nd only to a correct result... and its a very, very close second and...

  • Reply To: Append MMYYYY to File to Copy

    Everyone says that PowerShell is an essential skill for the modern DBA... bumping this for Bruin to give people the opportunity to demonstrate that skill. 😀

    ZZartin did make a submission...

  • Reply To: SQL Query

    @steve-2 Collins,

    I'm still interested in the ChatGPT prompt that you used to generate the populated test table because it'll help people understand how to use ChatGPT to do such a...

  • Reply To: SQL Query

    For anyone that wants to do a little analysis as to why the use of OR is so bad and to do a little performance testing, here's code to build...

  • Reply To: SQL Query

    drew.allen wrote:

    Here is an alternative that a) does not use an OR and b) does not use a subquery.

    WITH TempOrdered AS
    (
    SELECT t.ID
    ...
  • Reply To: SQL Query

    buddyhelp wrote:

    Hi Ddee,

    You can achieve the desired result using the following SQL query:

    sql

    SELECT ID, flag, name FROM your_table t WHERE (flag = 0 AND NOT EXISTS (SELECT 1 FROM your_table...

  • Reply To: What is the meaning actually for DWH

    Heh... I saw no indication of your comment being hypothetical.  I'm concerned that others won't, either. 😉

  • Reply To: What is the meaning actually for DWH

    My personal feeling is that phone numbers for people that have taken a survey are actually no one's business and should not be included in a DW.

  • Reply To: SQL Query

    Hi, Ellen.  Welcome aboard.

    It'll be interesting to see how the ORs in that affect performance on larger tables.  I'll try to setup a larger test tonight.

  • Reply To: I have string data in a column and i need to strip out parts of it.

    Preamble:

    I know Jonathan posted test code and solution code but his code returns the word "Header" for the "Edge Case" of the "LineType" (my name for the "field") not being...

  • Reply To: The Choice of SQL Server Version

    djpeter27 wrote:

    We are in the process of rolling out SQL Server 2022 to production. Hopefully getting the first environment done after the Summer. The dealbreaker for us was Azure AD...

  • Reply To: I have string data in a column and i need to strip out parts of it.

    Ah... my apologies, James.  Based on your request (repeated below), I interpreted it as there would be 1 to 4 "numbers" in a single row.  What you meant was "one...

  • Reply To: SQL Query

    Steve Collins wrote:

    Thanks to ChatGPT for creating the temp table

    DROP TABLE if exists #TempTable;
    go
    CREATE TABLE #TempTable
    (
    ID INT,
    flag int,
    ...
  • Reply To: SQL Query

    Steve Collins wrote:

    Thanks to ChatGPT for creating the temp table

    Let's see what the actual prompt for that was, please.

    For those interested, here's a link to the prompt that I used and...

Viewing 15 posts - 1,246 through 1,260 (of 59,066 total)