Forum Replies Created

Viewing 15 posts - 121 through 135 (of 1,228 total)

  • RE: Aligning 2 rows into 1 row

    Suth (11/13/2015)


    Getting a error

    Msg 245, Level 16, State 1, Line 1

    Conversion failed when converting the varchar value ',' to data type int.

    In the APPLY block, cast r.id to varchar(n),...

  • RE: CASE Assistance

    SUM() OVER() would preserve rows.

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    ChrisM@Work (8/19/2015)


    serviceaellis (8/18/2015)


    Please see attached.

    The worksheet is the result that needs to be produced with the highlighted row.

    in the Access file the two tables are:

    1. PersonMembership - with all the...

  • RE: Long running Select Query

    coolchaitu (8/18/2015)


    Datatype of te.TripEndTime. You had asked what is the datatype of te.TripEndTime.

    It wasn't clear.

    You should change the datatype to datetime as a matter of priority.

    Did you run the...

  • RE: Long running Select Query

    coolchaitu (8/18/2015)


    Its datatype is varchar

    Datatype of what?

  • RE: Should I go Contracting in South West England?

    The south east appears to be still quite bouyant after a peak in June/July. There used to be a lot of activity based around Exeter but I haven't seen any...

  • RE: Issue returning unique rows

    Your result set shows two different photo id's for the same user id. Try using APPLY to return a single row from the photos table, like this:

    SELECT

    p.Id [SenderId],

    p.Username,...

  • RE: Query Execution plan too long

    thenewbee (7/22/2015)


    Hi All,

    I am working on a legacy application and one of the view has degraded performance. I have to fix it,

    but the query execution makes me mad as it...

  • RE: Query Execution plan too long

    thenewbee (7/26/2015)


    Attached a test plan, Is it possible to avoid the table scan & clustered index scan in this scenario

    Yes. Create covering indexes for both tables, something like this:

    CREATE INDEX...

  • RE: Using a Recursive CTE to Generate a List

    Eirikur Eiriksson (6/28/2015)


    ChrisM@home (6/28/2015)


    This is about the simplest rCTE that I can think of. No 8k pages anywhere yet Statistics IO reports logical reads:

    SET STATISTICS IO ON;

    WITH rCTE AS (

    SELECT...

  • RE: Using a Recursive CTE to Generate a List

    This is about the simplest rCTE that I can think of. No 8k pages anywhere yet Statistics IO reports logical reads:

    SET STATISTICS IO ON;

    WITH rCTE AS (

    SELECT n = 1

    UNION...

  • RE: Using a Recursive CTE to Generate a List

    dfischer 36834 (6/26/2015)


    Very interesting. However, the stated result was for a comma delimeted countyID not countyName. When I changed countyName to CountyID I got a conversion error. Not sure why.

    Try...

  • RE: Is is possible to Dynamic join on EXECUTE table column

    pjn (6/23/2015)


    Not sure? if this is ever going to be possible, but I'm trying to do a dynamic join on EXECUTE, but the execution string has to come from a...

  • RE: Eliminating a Distinct SORT operation

    lmarkum (6/19/2015)


    I have an UPDATE statement that joins two table by SendId. One table, I'll call it T1, has a clustered index on SendId ASC. The other table...

  • RE: SQL query

    GilaMonster (6/4/2015)


    ChrisM@Work (6/4/2015)


    spectra (6/4/2015)


    Ok. not an issue. Is it possible to write this in pure SQL way ? (so that I don't face database migration issue later)

    My...

Viewing 15 posts - 121 through 135 (of 1,228 total)