Forum Replies Created

Viewing 15 posts - 3,526 through 3,540 (of 10,144 total)

  • RE: intersect

    karthik babu (3/18/2014)


    as early as possible.. since its EOD today we have 12+ hrs 🙂

    How about pasting the assignment here so we don't have to guess what you're trying to...

  • RE: intersect

    The values of i (1, 2 and 3) have a value of j which is common to all of them (4). Another way to view this: a value of j...

  • RE: intersect

    karthik babu (3/18/2014)


    i have the below table.. i need the intersection of j with group by of i column, which is 4. pls let me know the query to arrive...

  • RE: sum of two queries

    HanShi (3/18/2014)


    The value in column "tm.LIBTYPMVT" differs, so this will result in a single row for each value. If you remove column "tm.LIBTYPMVT" from the SELECT list, the results will...

  • RE: sum of two queries

    136romy (3/18/2014)


    hi community here I have two queries that I want to sum my stock but I do not know how....

    Use table aliases to eliminate unnecessary noise from your queries,...

  • RE: Identifying discrepancies

    ccmret (3/17/2014)


    I want to select the empid listed more than once and then mark DOB as an ERROR if the dates are not equal.

    So if you have an empid with...

  • RE: How to remove trailing zeros from a decimal (type) value?

    david.dartnell (3/16/2014)


    Hi Everyone,

    I would like to 'drop' some trailing zeros from a decimal value, e.g.: 50.000000, and I am wondering how to go about this?

    The value is definitely of decimal...

  • RE: Today's Random Word!

    Kurt W. Zimmerman (3/14/2014)


    EricEyster (3/14/2014)


    Ed Wagner (3/14/2014)


    Stuart Davies (3/14/2014)


    BWFC (3/14/2014)


    Gaul

    bladder

    Water

    boat

    yacht

    rock

  • RE: Cross Apply --reducing the number of combinations

    rhmohamed (3/14/2014)


    Hi,

    That's totally correct.

    was almost there by adding a distinct to my query and adding the PK.but seems not totaly correct.

    Best regards

    What makes 2 and 3 different from 1?

    How...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (3/14/2014)


    Ed Wagner (3/14/2014)


    Grant Fritchey (3/14/2014)


    GilaMonster (3/14/2014)


    Anyone for a game of 'guess what index is on which table'?

    http://www.sqlservercentral.com/Forums/Topic1550657-391-1.aspx

    Yeah, that one is killing me. Vague weirdness, badly edited execution plans...

  • RE: Count distinct values - help needed.

    Any time.

    There are several ways to write this query, including joining the lookup to the original query as a derived table.

    Thanks for the feedback.

  • RE: Count distinct values - help needed.

    SELECT

    EnqueueDate = CAST(m.EnqueueDate AS DATE),

    m.Siteid,

    s.[SiteID name],

    Total = COUNT(*)

    FROM MessageQueue m

    INNER JOIN SiteID s

    ON s.SiteID = m.SiteID

    GROUP BY

    CAST(m.EnqueueDate AS DATE),

    m.Siteid,

    s.[SiteID name]

    ORDER BY m.EnqueueDate DESC

  • RE: Count distinct values - help needed.

    You're welcome, good luck.

  • RE: Count distinct values - help needed.

    Sure, try this:

    SELECT processingday = CAST(processingday AS DATE), ID, COUNT(*)

    FROM mytable

    GROUP BY CAST(processingday AS DATE), ID

  • RE: Count distinct values - help needed.

    MickyD (3/13/2014)


    Hi everyone.

    Can someone offers some advice on how to achieve this.

    I need to count the number of records that exist for a distinct value in a table.

    I.e. On...

Viewing 15 posts - 3,526 through 3,540 (of 10,144 total)