Forum Replies Created

Viewing 15 posts - 151 through 165 (of 1,424 total)

  • Reply To: How to get Active counts between dates. Please

    Using a tally function or GENERATE_SERIES maybe something like this

    /* expand the date range using a tally function */
    select v.calc_dt, count(*) active_policies
    from #Policy p
    ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Writing SQL Server code with AI using GitHub Copilot

    A while ago when I looked into GitHub Copilot, the service was based on ChatGPT-3.5 which is/was quite inferior imo to the ChatGPT-4 which was available at the time. 

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Do You Have a Jeff?

    Back in the day, before SQL Server 2012 was previewed, I worked on a project which started with a blank database.  My teammate at the time started sending me articles...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: How to substract value from its own column in same tabl through condition basis

    We'll have to see how the OP replies.  Maybe my code only summed the part they want subtracted from the sum_qty

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: How to substract value from its own column in same tabl through condition basis

    All right, some data.  This could be my only chance to use SQL for the day.  For my part, this week and until it's done, I'm working on web development. ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Finding strings with invalid characters

    That old function could use an updating imo.  As this is the 2022 topic GENERATE_SERIES and STRING_AGG are available.  Also, not to say it's incorrect but...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Combine rows into pivoted output

    To make the selection criteria specific to each column you could try a conditional aggregation approach to pivoting the data

    select TestID,
    ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Has AI Changed Software Development?

    This question still has me thinking.  How has development changed because of AI?  There's more than one trend happening at once imo.  For SQL the impact for me has been...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Inconsistent query execution times

    MrBen wrote:

    Thanks alot guys, I think I've taken a bit from each of the 3 posts and have made progress. I've posted the new execution plan below. Seems to be...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Inconsistent query execution times

    Disclaimer: this contains speculation and opinions

    In broad terms, when considering performance, imo it makes sense to overlay the FROM clause with the execution plan.  The FROM clause is read left-to-right...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Get count from previous month

    This query looks for the minimum previous appropriate enter_date for each row and then calculates the DATEDIFF.  The sample was expanded to include a greater than 12 month gap

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Has AI Changed Software Development?

    "Gpt-4-1106-preview has training cutoff of 4/2022 and the context size is 16K (double the standard Gpt4)"  Oops that was not correct.  The cutoff for Gpt4-Turbo is 4/2023 and the context...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Has AI Changed Software Development?

    Jonathan AC Roberts wrote:

    The company I work for has implemented ChatGPT 4 on its internal servers, actively promoting its usage among all employees. Given its deployment on company servers, there is also...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Parse out filed as date time ???

    So you're ok with the loss of information assuming GMTOFFSET means what it appears to mean?  In SQL Server if you need to preserve the same information then you'd be...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Fixing Poor Programming Practices

    Once a few years ago, at a prior job, I went on a sales engagement with one of our sales people.  At one point I got called into a meeting...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Viewing 15 posts - 151 through 165 (of 1,424 total)