Forum Replies Created

Viewing 15 posts - 2,071 through 2,085 (of 5,504 total)

  • RE: Looping though XML Subnode and pass the Identity value

    Do you still use the XML variable?

    If so, you might want o try loading the data into a table with an ID column (being the clustered index) and add an...

  • RE: Calculating Delta values for each day

    Nicky Murphy (1/18/2011)


    Very neat!

    Is there a way of grouping by other intervals e.g. a week or a month?

    Yes.

    Just change GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, TIMESTAMP), 0) to the range you...

  • RE: Are the posted questions getting worse?

    GilaMonster (1/18/2011)


    Steve Jones - SSC Editor (1/18/2011)


    Well this is a depressing few pages in The Thread.

    I could make it worse, but I think maybe I'll decline to

    Let me guess: News...

  • RE: Report Model Security!!!

    duplicate post. please continue

  • RE: Deadlock at primarykey column

    GilaMonster (1/18/2011)


    Consider a nonclustered index on (JobCardID, StageID, SubJobID, IsActive, CompletedDate, QueueID)

    Gail, is there any specific reason to use all columns in the index instead of moving some to the...

  • RE: Calculating Delta values for each day

    Something like this?

    Step 1: get the max value per day and number the result set.

    Step 2: perform a self join with a row offset of 1.

    ; WITH cte AS

    (

    SELECT

    ROW_NUMBER()...

  • RE: baseline for read/writes

    Is there any specific reason for your duplicate post (here's the other one)?

    Based on your visit count I think you've been around long enough to know better...

  • RE: avg calculation

    additionally, we have a duplicate thread.

    @sravanb

    After reevaluating the issues as Craig recommended, please take the time and read the first article referenced in my (and Craigs) signature on how to...

  • RE: calculating avg

    Is there any specific reason for starting two threads with the identical issue within one hour?

    (http://www.sqlservercentral.com/Forums/FindPost1049494.aspx) :angry:

  • RE: avg calculation

    Why not using AVG() ... GROUP BY?

    Edit: and what do you consider as being a "recent value"? You'd need a date to compare against, but I can't find one: The...

  • RE: Mulitple procedure vs Single procedure

    CELKO (1/17/2011)


    ...

    But thanks to Texas oil money, I can get a dictionary of a dead language :crying:

    You're not talking about ANSI92 SQL "standard", are you? :hehe:

    Edit: Over here in Europe...

  • RE: SQL Dilemma

    Next try:

    First, select all signdate values and cross check it against the original table if there is a different client and the signdate is within the others client time.

    ; WITH...

  • RE: SQL Dilemma

    Ooopss!! Completely misunderstood the issue... I'm sorry!

    I thought you were looking for overlapping time intervals...

    Let's see if I can find a way....

  • RE: SQL Dilemma

    Here's an approach just based on selecting the data.

    The basic concept: Unpivot the data to get on row per start and one per end date.

    Based on the unpivoted data two...

  • RE: Please help with SQL code

    Jeff,

    I'm expecting the sample section to be

    [POL_COUNTRY_CD] [nvarchar](2) NULL,

    [POL_LOCATION_CD] [nvarchar](5) NULL,

    [POD_COUNTRY_CD] [nvarchar](2) NULL,

    [POD_LOCATION_CD] [nvarchar](5) NULL,

    At least that's what the sample data look like.

    The new columns are [POL_LOCATION_CD] and [POD_LOCATION_CD]. Those...

Viewing 15 posts - 2,071 through 2,085 (of 5,504 total)