Forum Replies Created

Viewing 15 posts - 1,441 through 1,455 (of 10,144 total)

  • RE: Splitting a delimited field

    richardmgreen1 (6/30/2016)


    Hi Chris

    Thanks for that.

    So I'd just just APPLY/LEFT JOIN as normal?

    As for the linked server, I have to for now.

    We're upgrading some servers to SQL2012 and then going to...

  • RE: Splitting a delimited field

    Treat it as any other tablesource, fashionably APPLY.

    Are you really running this query against a linked server?

  • RE: Query

    WITH _Tally AS (

    SELECT n = ROW_NUMBER() OVER(ORDER BY (SELECT NULL))

    FROM (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) d1 (n),

    (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) d2 (n)

    )

    SELECT

    t.ID,

    x.FromDate,

    x.ToDate

    FROM @tbl t

    CROSS APPLY (SELECT YearBoundariesCrossed = DATEDIFF(YEAR,t.Fromdate,t.Todate)) w

    CROSS...

  • RE: Are the posted questions getting worse?

    tindog (6/29/2016)


    ChrisM@Work (6/29/2016)


    tindog (6/29/2016)


    ChrisM@Work (6/29/2016)


    tindog (6/29/2016)


    ChrisM@Work (6/29/2016)


    tindog (6/29/2016)


    Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:

    The Welsh...

  • RE: Are the posted questions getting worse?

    tindog (6/29/2016)


    ChrisM@Work (6/29/2016)


    tindog (6/29/2016)


    ChrisM@Work (6/29/2016)


    tindog (6/29/2016)


    Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:

    The Welsh aren't like...

  • RE: Are the posted questions getting worse?

    tindog (6/29/2016)


    ChrisM@Work (6/29/2016)


    tindog (6/29/2016)


    Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:

    The Welsh aren't like us humans.

    I...

  • RE: Are the posted questions getting worse?

    tindog (6/29/2016)


    Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:

    Texas, New Hampshire and California are getting uppity...

  • RE: Are the posted questions getting worse?

    tindog (6/29/2016)


    Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:

    The Welsh aren't like us humans.

  • RE: Are the posted questions getting worse?

    Luis Cazares (6/28/2016)


    Just a little humor.

    Bwahaaahaaaa! Made my day Luis thanks for posting this!

  • RE: Issue with query

    narayanamoorthy.a (6/28/2016)


    So is it a problem with the code ?

    Not really - it's a problem with the image datatype. It's been deprecated and will be removed in a future version...

  • RE: Issue with query

    Luis Cazares (6/28/2016)


    ChrisM@Work (6/28/2016)


    Just a thought - try this mod:

    AVG(CAST(datalength(embedded_data) AS BIGINT))

    More like this:

    AVG(datalength(CAST(embedded_data AS varbinary(MAX))))

    However, the image data type length can fit in an int.

    From BOL for...

  • RE: Issue with query

    Just a thought - try this mod:

    AVG(CAST(datalength(embedded_data) AS BIGINT))

  • RE: Issue with query

    select count(*), avg(datalength(embedded_data)) from task_attach where id_task_user = NEWID()

    AVG_BIG()?

  • RE: Issue with query

    Just to recap, when you run the third query, this one:

    -- checkin

    select count(*), avg(datalength(embedded_data)) from task_attach where id_task_user in (

    select id

    from task_user

    where task_type = 2

    and date_begin >= CAST(CAST(DATEADD(DAY,-180,GETDATE())...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (6/28/2016)


    And now I hear London wants to be a city-state so it can determine it's own strategy for staying in the EU. (part of that comment is tongue-in-cheek,...

Viewing 15 posts - 1,441 through 1,455 (of 10,144 total)