Forum Replies Created

Viewing 15 posts - 946 through 960 (of 3,957 total)

  • RE: T-SQL Help

    PSB (1/7/2014)


    The sample of the desired result provided for ClosedTicketsTillDate is not correct.

    OpenticketsTillDate works perfectly . Below is what I need for ClosedTicketsTillDate .

    For Grp A , where create DAte...

  • RE: Hidden Formatting Troubles with STR() (SQL Spackle)

    Jeff Moden (1/7/2014)


    paul.goldstraw (1/7/2014)


    Thanks Jeff, makes sense. If someone asked me to right justify some text I think the quicker solution would be closer to what I would have attempted...

  • RE: T-SQL Help

    Jeff Moden (1/6/2014)


    dwain.c (1/6/2014)


    I agree that I don't think the OP's input data matches the stated, expected results. However I do believe what he's looking for would be something...

  • RE: T-SQL Help

    Jeff Moden (1/6/2014)


    [EDIT]... hmmm... although.... it might just be a RANK problem, now that I think about it a bit more.

    OK. You've got my attention. I've see DENSE_RANK...

  • RE: T-SQL Help

    Jeff Moden (1/6/2014)


    Other than that, this is a LEAD/LAG problem and that does require SQL Server 2012... which I don't have installed anywhere, yet.

    Actually, COUNT over a window frame is...

  • RE: T-SQL Help

    I agree that I don't think the OP's input data matches the stated, expected results. However I do believe what he's looking for would be something like this:

    SELECT [GROUP],...

  • RE: Urgent help need to create query

    debajit (1/4/2014)


    Hi Kapil,

    Please find sample data.

    File_List

    File_ID File_Status Customer_NameDirectionFirst_DirectoryOriginal_FileName

    1 Active P&G ...

  • RE: Join Help

    SQL and Soda (1/3/2014)


    I don't think you can make ON clauses conditional.

    Correction. It is possible to have conditional ON clauses using CASE. However, in this case I don't...

  • RE: T SQL QUERY TO GROUPING SEQUENTIAL DATES IN SQL SERVER.

    I would never attempt to produce a faster solution than ChrisM@Work because I know I can't, unless of course I get a little help from Itzik Ben-Gan.

    -- Method by Itzik...

  • RE: Select statement to show users in more than one company

    Ultimately, I believe you will need to aggregate twice. Once on User ID and once on company. So here's an alternate approach.

    SELECT a.[User ID], [Group ID], Company

    FROM

    (

    ...

  • RE: Hidden Formatting Troubles with STR() (SQL Spackle)

    Jeff Moden (1/3/2014)


    ...

    Ok... that tears it. :blush: I have to get off my dead hinny and install 2K12. Thanks to folks like you, Wayne Sheffield, and a couple...

  • RE: Hidden Formatting Troubles with STR() (SQL Spackle)

    Lynn Pettis (1/4/2014)


    Okay, I was just curious as it is a pet peeve of mine. The semicolon is a statement terminator not a statement begininator.

    I confess to being one...

  • RE: Hidden Formatting Troubles with STR() (SQL Spackle)

    Thanks yet again for an insightful article (probably one of the few of your I hadn't read prior). Indeed, a crack was filled.

    I was curious what the SQL 2012...

  • RE: Need help with the query.........

    pietlinden (1/2/2014)


    But what if it's a Babelfish and I need it to speak T-SQL?

    You can use:

    EXEC sp_translate @SourceLanguage='gibberish', @TargetLanguage='T-SQL'

  • RE: Difference between two date/times and flag each hour in between

    I'm not sure if this is exactly what you want but you might want to look at it and see if it gives you some ideas.

    WITH SampleData (ID, SDT, EDT)...

Viewing 15 posts - 946 through 960 (of 3,957 total)