Forum Replies Created

Viewing 15 posts - 331 through 345 (of 1,414 total)

  • Reply To: How to summarise values in hierarchies

    Maybe you're looking for the SUM OVER the volume partitioned by the 'parent_id' column but which column is appropriate to ORDER BY?  If ORDER BY the 'filter_path' column it causes...

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

  • Reply To: Adding of single quote in a string

    Phil Parkin wrote:

    The enable_ordinal argument for STRING_SPLIT is not implemented in 2019.

    It's true.  It's available in Azure SQL compatibility level 150 (and above) and SQL Server 2022.  There are alternatives such...

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

  • Reply To: Adding of single quote in a string

    drop table if exists #some_table;
    go
    create table #some_table (
    input_string varchar(200) not null);

    insert #some_table(input_string) values
    ('5,1,6,1,69,1'),
    ('5,1,6,1,3,2,5,3,69,1');

    select string_agg(iif((ss.ordinal-1)%2=0, concat('''', ss.[value], ''''), ss.[value]), ',')
    ...

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

  • Reply To: full name splitting based on the condition

    Maybe something like this

    drop table if exists #some_table;
    go
    create table #some_table (
    full_name_proper varchar(200) not null);

    insert into #some_table values
    ('A'),
    ('A B'),
    ('A B C'),
    ('A B C D'),
    ('A B C...

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

  • Reply To: Split column into multiple column/rows

    You could try OPENJSON and provide the 2 column schema definition

    declare @json           nvarchar(max)=N'[{"display":"Section1","value":"1"},{"display":"Section2","value":"2"}]';

    select oj.[value], oj.display
    from openjson(@json)
    ...

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

  • Reply To: Update Column query

    The windowing function FIRST_VALUE returns the first value in an ordered set.  In this case PARTITION BY item_num ORDER BY revision.  You could use a CTE to UPDATE the column...

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

  • Reply To: I need some urgent help!

    In SELECT statements the FROM clause and JOINs are evaluated first.  Maybe you could use the VALUES table value constructor to store (rows of) criteria, order number, and value.  Then...

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

  • Reply To: Looking for feedback for my new database browser

    At this point no I haven't downloaded the desktop app.  I did look around some more at the Blazor razor pages.  In that area in general you seem to be...

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

  • Reply To: Looking for feedback for my new database browser

    john43 wrote:

    (another attempt to fight the anti-spam forum measures)

    EF isn't used at all for the interesting parts. I just added it 2 weeks ago and it's only used by the...

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

  • Reply To: Looking for feedback for my new database browser

    The GitHub link is only visible in the footer of the demo/query section of the site

    https://github.com/jtheisen/squil

    john42 wrote:

    Entity Framework is just used for configuration purposes, the actual data access during browsing...

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

  • Reply To: Looking for feedback for my new database browser

    Very interesting.  It looks impressive and the site works great.  The GitHub repo (+1 star'ed) is always the interesting part imo.  It seems maybe the project began a while ago...

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

  • Reply To: How to Append Character to Field Values

    You could nest the current formula inside an additional CONCAT function and test for the existence of the lead characters

     SELECT  tt.homepage_url
    ...

    • This reply was modified 3 years, 9 months ago by Steve Collins. Reason: LEFT(String, 4) is a better comparison than CHARINDEX

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

  • Reply To: How to display original part and recommende part with each other but must recome

    Does the query return the expected output?

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

  • Reply To: Assembling Your Own Toolbox

    One place to keep important SQL-related information for me is SSC's Briefcase feature.  For a while after I became a member it wasn't working (at least for me using Chrome...

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

  • Reply To: The Growth of IQP

    larry.blake wrote:

    Steve Collins, I don't see how we can avoid using ORMs and report writers.

    ...

    Sometimes the easy fix is good enough.

    Avoidance is the easy way imo

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

Viewing 15 posts - 331 through 345 (of 1,414 total)