Forum Replies Created

Viewing 15 posts - 9,961 through 9,975 (of 10,144 total)

  • RE: Group by where MAX can be the same

    Hi David

    I would use something like this 'cos it's quick...

    SELECT X.h_id, MAX(X.l_id), X.ton

    FROM #t1 X

    INNER JOIN (SELECT h_id, MAX(ton) AS MAXton FROM #t1 GROUP BY h_id) dt

    ON dt.h_id...

  • RE: SUM divided by COUNT Issue

    Try this, Ryan:

    SELECT "Agent Group (Name & #)",

    "Application (Name & #)",

    "Agent (Name & #)",

    "Total Calls",

    "Total Talk" / "Total Calls" AS "Average Talk",

    "Total Hold" / "Total Calls" AS "Average...

  • RE: Please add a custom 404 page in maintenance mode

    Confirmed. Can't remember what the message was, but it suggested that something had changed in our firewall!

    Funny thing is, each of the three forums (fora?) I spend most time on...

  • RE: Matching names & addresses between tables

    antonio.collins (2/14/2008)


    With that many addresses, you might want to look into the USPS address matching system. With it, you can cleanup and standardize mailing addresses, city, state, zips. ...

  • RE: Matching names & addresses between tables

    of course, and the best approach I've seen yet in terms of both accuracy and speed is QA batch. But not everybody is prepared to pay for it....

  • RE: Case statement

    Simple CASE:

    CASE SalesProb WHEN 0 THEN...

    Searched CASE:

    CASE WHEN SalesProb = 0 THEN...

    Searched CASE is more expensive than simple CASE.

    Either way you will need a column assignment:

    ,NewColumn = CASE...END

    or

    ,CASE...END...

  • RE: Converting Getdate() To Varchar

    D'oh!:blush:

  • RE: Converting Getdate() To Varchar

    Here's a couple of ideas.

    DECLARE @Now DATETIME

    SET @Now = GETDATE()

    SELECT @Now

    SELECT CAST(datepart(yy, @Now) AS CHAR(4)) +

    RIGHT('0'+LTRIM(cast(datepart(mm, @Now) as VARCHAR(2))), 2) +

    RIGHT('0'+LTRIM(cast(datepart(dd, @Now) as VARCHAR(2))), 2) +

    RIGHT('0'+LTRIM(cast(datepart(hh, @Now)...

  • RE: need help with this query please?

    Blair

    Two minuses like this flags the rest of the line as a comment.

    Peso's solution is a perfect and extremely elegant solution to the problem as originally described - does...

  • RE: ISOLATION LEVELS and LOCKS

    Karthik

    No locks will be held.

    Until you do something. What do you want to do with the tables? SELECT? UPDATE? INSERT?

    Enter "Isolation level" (without the double quotes) into the search tab...

  • RE: Get DATE part of the DATETIME

    jcrawf02 (2/6/2008)


    Because we just have to be different. I'm going to go get my 'twelve barley-corns, round and dried' to measure something now . . .

    Nah, pretty sure it...

  • RE: Get DATE part of the DATETIME

    jcrawf02 (2/6/2008)


    why am I getting times in the result for all of these, when I want only the date portion?

    Curious - can you post what you've tried, with the results?

  • RE: need help with this query please?

    Blair Dee (2/5/2008)


    no, trust me, its not homework - i wish it was. it is for my job - a healthcare facility that uses another area hospital's pharmacy services...

  • RE: need help with this query please?

    So you're looking to match, one for one, your sales & refunds, and examine what's left?

Viewing 15 posts - 9,961 through 9,975 (of 10,144 total)