Forum Replies Created

Viewing 15 posts - 286 through 300 (of 1,419 total)

  • Reply To: Query

    What determines the hierarchy of 'LicenceQty' row values from which to begin the subtraction?  In the case of ProductID=1 the example appears to apply lifo, "last in, first out", and...

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

  • Reply To: Query

    Well, what does the chatbox have to say about this one?  It doesn't look too tricky imo

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

  • Reply To: Aggregate Select Results and convert Secs to Hours Mins.

    Jeff Moden wrote:

    BTW and just to clarify, I'm damned impressed with what they've been able to get ChatGPT to do.  The technology behind all of that is mind boggling .  My...

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

  • Reply To: Sampling : Select the sample records

    Presumably there are other employees besides Betty?  If so it would be convenient to start with a table containing (unique) employees and the sample size.  In the case where you're...

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

  • Reply To: Case expression with NULL

    The question came up based on this forum post.  Not sure I'd know the answer otherwise

    https://www.sqlservercentral.com/forums/topic/nullif-in-ssis#post-4122037

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

  • Reply To: JSON formatting output nested array

    Afaik JSON treats carriage returns as white space.  At the bottom of this page it says:

    Whitespace can be inserted between any pair of tokens

    Then there's this...

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

  • Reply To: 60 Second Rolling Avg With Different Starting Points

    Afaik this matches the output from the existing query.  To add additional columns you could add additional CROSS APPLY operators and then vary the date inequalities in the WHERE clause(s)

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

  • Reply To: Dimension start and end dates

    It seems tricky to wade in on this because maybe it's ok the way you're doing it.  Or idk maybe more than one thing is amiss.  Why add columns in...

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

  • Reply To: Cant extract values from JSON Array

    ZZartin wrote:

    Well the flip side of that question is, if you're passing the information on to a system that wants to read JSON do you store the sqlified data in...

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

  • Reply To: Cant extract values from JSON Array

    Jeff Moden wrote:

    but do you suppose that they'll actually use your good code to "normalize the data" and store that normalized data in a database or store the JSON and parse...

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

  • Reply To: Distance between multiple locations

    What could you say about the relationship between the cranes and the fixed locations?  The distances being calculated are between the cranes and the fixed locations?  Can cranes switch locations?

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

  • Reply To: Cant extract values from JSON Array

    Jeff Moden wrote:

    You just wrote custom code on the database side of the house by including INT and NVARCHAR(MAX) in the code, no? 😛

    Of course, the differentiated database code is custom. ...

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

  • Reply To: Cant extract values from JSON Array

    And there's nothing wrong with ratbak's approach.  It could be an efficient way.  The downside is having to do double REPLACE of the array brackets

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

  • Reply To: Cant extract values from JSON Array

    Jeff Moden wrote:

    TBH, I have an extreme dislike for all of the solutions on this thread, not because of how they were coded, but because such code was required to begin...

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

  • Reply To: Changing a UDF to a SET BASED QUERY

    Rob Reid-246754 wrote:

    Sorry I haven't gotten back to you but I had a lot of hospital and doctor appointments lately, so much, I haven't even had a chance to place any bets...

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

Viewing 15 posts - 286 through 300 (of 1,419 total)