Forum Replies Created

Viewing 15 posts - 1,771 through 1,785 (of 2,643 total)

  • RE: very slow select

    Jeff Moden - Tuesday, January 22, 2019 12:04 AM

    Jonathan AC Roberts - Monday, January 21, 2019 8:19...

  • RE: very slow select

    Tomys - Monday, January 21, 2019 7:47 PM

    Dear sir I tried creating index and it was taking a lot of time so...

  • RE: Determining a Start Date within a subset of a group

    I think you will half the calls to your function if you use a cross apply:
    SELECT k.KENNEL_NO AS KennelNumber,
     ISNULL(k.KENNEL_STAT, '') AS KennelStatus,
     ISNULL(k.kennel_substat, '') AS KennelSubstatus,

  • RE: Query tuning with conditional aggregation

    Do you have 1 row per Timestamp, TagName? If so I think your query is probably about as fast as it will go. If you have many rows per Timestamp, TagName...

  • RE: very slow select

    pietlinden - Monday, January 21, 2019 8:42 AM

    There query appears to be missing an alias:
    SELECT o2a.SOURCE_ID source_id, o2a.VALUE 
    FROM CR2Copy..OBJECT_TO_ATTRIBUTE

    should be

  • RE: very slow select

    It might be worth trying to rewrite the query. The query below is equivalent to your query and will produce a different execution plan:
    It would be good if you...

  • RE: very slow select

    Tomys - Monday, January 21, 2019 6:45 AM

    Jonathan AC Roberts - Sunday, January 20, 2019 9:26 AM

  • RE: Update a table column from a join with another table

    UPDATE A
       SET A.Action = IIF(B.EmpId IS NULL,'create', 'update')
      FROM dbo.DutyA A
      LEFT JOIN dbo.DutyB
             ON B.EmpId = A.EmpId
          ...

  • RE: very slow select

    Tomys - Sunday, January 20, 2019 6:43 AM

    Jonathan AC Roberts - Saturday, January 19, 2019 7:21 AM

  • RE: very slow select

    8 hours sounds too much that simple query with that execution plan.
    How many rows are on your table?
    How big are the columns?
    How many rows do...

  • RE: User Defined Function for following scnario

    Jeff Moden - Friday, January 18, 2019 3:16 PM

    You don't actually want to do this.  There are some pretty offensive words...

  • RE: Find overlapping time intervals excluding overlapping time

    If you want to union the internal and external downtime together to produce one set of downtime you could use a query like this:
    ;WITH AllDownTime AS
    (

  • RE: Pivot Table round to 1 deciaml.

    ipawelkon - Friday, January 18, 2019 7:11 AM

    Great you are an legend 🙂
    Thanks a lot.

    I tried to run this qry from link...

  • RE: Pivot Table round to 1 deciaml.

    This works with your data:
    SELECT [week],
       convert(decimal(9,1),[Truck (Galway)]) [Truck (Galway)],
       convert(decimal(9,1),[Trailer (Galway)]) [Trailer (Galway)],
       convert(decimal(9,1),[E-Evap (Galway)]) [E-Evap (Galway)]
    FROM
    (
    ...

  • RE: Need help with the query for MSforeachdb

    Syed_SQLDBA - Friday, January 18, 2019 5:25 AM

    I need to find a column in all DBs on multiple server since I don't...

Viewing 15 posts - 1,771 through 1,785 (of 2,643 total)