Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 1,413 total)

  • Reply To: Teams That Ship

    Steve Collins wrote:

    Stripe Change Log

    That's a link to the monthly breaking changes to the Stripe API.  Words cannot express... it's too much too often... it forces you to choose between...

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

  • Reply To: Teams That Ship

    Stripe Change Log

    That's a link to the monthly breaking changes to the Stripe API.  Words cannot express... it's too much too often... it forces you to choose between constantly...

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

  • Reply To: Procedure edit for accumulated points

    Needs sample data or it's unlikely to work as intended the first time.

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

  • Reply To: Procedure edit for accumulated points

    alter procedure [dbo].[_BARank]
    as
    set nocount on;
    set xact_abort on;

    begin transaction
    begin try
    Declare
    @executor ...

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

  • Reply To: How to delete child records from table tradecode that not have parent on tradeco

    delete tc
    from
    #TradeCode tc
    where not exists
    (select 1 from #MappingCodeValue mcv
    where mcv.ChildCodeType=tc.CodeType
    ...

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

  • Reply To: Case when with a Pivot

    This puts it all together in 2 styles.

    /* Jeff's style */
    SELECT Cust_num, Co_num
    ,Total ...

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

  • Reply To: Case when with a Pivot

    Very very nice pre-aggregation!  Now thaaaat's the way to do it.

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

  • Reply To: Using Code Snippets in SSMS

    This is great article!  I'm going to give it a try.

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

  • Reply To: Case when with a Pivot

    select
    Cust_num, Co_num,
    sum(amount) Total,
    sum(iif(floor(datediff(d,due_date,getdate())/30)=0,amount,0)) [1-30 Days],
    sum(iif(floor(datediff(d,due_date,getdate())/30)=1,amount,0)) [31-60 Days],
    sum(iif(floor(datediff(d,due_date,getdate())/30)=2,amount,0)) [61-90 Days],
    sum(iif(floor(datediff(d,due_date,getdate())/30)>2,amount,0)) [>90 Days]
    from EES_App.dbo.artran_all
    group by Cust_num, Co_num;

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

  • Reply To: Select return no records

    jcelko212 32090 wrote:

    I think this is horrible advice. The customer number is an identifier for a customer (I assume), and not a magnitude or quantity of some attribute. Therefore, according to...

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

  • Reply To: Top 10, count Distinct of multiple columns in select statement

    Something like this maybe

    ;with
    SiteInfo(SiteId, SiteName, JobId, Grade) as (
    select 1, 'aaa', 1, 'a'
    union all
    select 1,...

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

  • Reply To: Slow Query when add 1 additional field

    To see more about what Jonathan's suggesting maybe have a look at this page:

    https://docs.microsoft.com/en-us/sql/relational-databases/indexes/create-indexes-with-included-columns

    It could be looked at like there're 2 ways to "include" columns in an index: 1) as...

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

  • Reply To: Query Required this scenario

    drop table if exists #tblRecorddetails;
    go
    create table #tblRecorddetails(
    Recordid int,
    Userid ...

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

  • Reply To: In varchar column add numbers and show strings

    drop table if exists #temp;
    go
    create table #temp (
    userid int , rid varchar(10), value varchar(100));

    insert #temp(userid,rid,value) values
    (1,'D01','3'),
    (1,'D01','4'),
    (2,'C01','hey'),
    (2,'C01','1');

    with t_cte(userid,rid,value) as (
    select
    ...

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

  • Reply To: Only one expression can be specified in the select list when the subquery is not

    Maybe this could work too

    select 
    coalesce(ph.username, (select Message from itrm_itbf.temp.security))
    from
    ITRM_ITBF.[PMD].[PMD_HR] ph
    join
    ITRM_ITBF.[Dflt].[MANUAL_LSV_PERMISSIONS] mlp on ph.username=mlp.username
    ...

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

Viewing 15 posts - 1,066 through 1,080 (of 1,413 total)