Forum Replies Created

Viewing 15 posts - 646 through 660 (of 1,424 total)

  • Reply To: Help with Boolean check box combinations

    If I'm understanding this could this be done in the WHERE clause with a bunch of OR conditions.

    select * 
    From Master as pom
    WHERE Pom.UserID = @userid
    ...

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

  • Reply To: what condition case when related to portion key mean ?

    Have a look at the Docs for SUBSTRING

    SUBSTRING ( expression ,start , length )

    When the CASE statement is evaluated as TRUE, because you're adding +1 to the length LEN...

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

  • Reply To: Forum Api Project

    Yes the repository is the better place for the code.  There are going to be many changes and now this thread seems incomplete.  Maybe it makes sense to start over...

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

  • Reply To: Forum Api Project

    Hi Steve Jones, when these posts were consolidated from what were originally 7 separate threads it appears a post(s)? containing the DDL and explanation for having a System Version'ed edition...

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

  • Reply To: Forum Api Project

    It's been a few weeks since there's been an update.  We've had some work upheaval and also my son's 6th Birthday party and the Memorial Day holiday.  Workwise I've been...

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

  • Reply To: Convert string containing ''yyyyMMdd_HHmm' back to Datetime format (dd-mm-yyyy

    The function could be included in the SELECT list

    select lcd.LoggerDownloadTableName,
    smalldatetimefromparts(substring(lcd.LoggerDownloadTableName, 18, 4),
    ...

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

  • Reply To: Convert string containing ''yyyyMMdd_HHmm' back to Datetime format (dd-mm-yyyy

    You could try SMALLDATETIMEFROMPARTS

    select v.input, 
    smalldatetimefromparts(substring(v.input, 18, 4),
    ...

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

  • Reply To: How to convert characters or number to underscore and after that concatenate it

    The least friction way imo seems to be to split each character using fnTally and convert to ASCII values.  Then re-aggregate the string.  Something like this (with extra non-[a-z][0-9]) characters...

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

  • Reply To: Help with writing SQL logic

    You could try something like this

    select ph.PolId, 
    case when isnull(pa_est.est_count, 0)>0
    ...

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

  • Reply To: sql script help

    Sure, the function is described in this really nice article.   This is the code I use

    CREATE FUNCTION [dbo].[fnTally]
    /**********************************************************************************************************************
    Jeff Moden Script on SSC:...

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

  • Reply To: sql script help

    This query is really close but maybe there's an inconsistency issue with the 'tab1_result' query?

    with tab1 as
    (
    select 101 as id, 'abc' as area,'2021-01-07'...

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

  • Reply To: Find max availability interval durations

    In the code below 'start_cte' creates a column called 'start_ind' which is equal to 1 when the AVAILABLE column has changed from 0 to 1 else it is 0.  To...

    • This reply was modified 5 years, 5 months ago by Steve Collins. Reason: Changed stop_ind to start_ind to make clearer

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

  • Reply To: No-code Software Engineering

    ZZartin wrote:

    Because they're different tools for different jobs.  JSON or XML are supposed to be versatile(unlike older mainframe type hierarchies) and capable of being transmitted and consumed by a broad...

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

  • Reply To: No-code Software Engineering

    ZZartin wrote:

    The issue isn't so much that SQL server can't parse and format json it's that the data is represented in fundamentally different ways.  And what your translation layer is...

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

  • Reply To: No-code Software Engineering

    David.Poole wrote:

    I've seen our CMS mistakes made with various ETL tools, web frameworks, ORMs. Don't fight the tools, learn how to use them.

    Fighting the tools is futile in most cases...

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

Viewing 15 posts - 646 through 660 (of 1,424 total)