Forum Replies Created

Viewing 15 posts - 1,636 through 1,650 (of 5,590 total)

  • RE: Problem: how to realize custom order

    Gianluca Sartori (3/25/2011)


    Yes, now translate it into T-SQL, set-based if possible. 🙂 Ugh!

    One made-to-order, set-based solution, utilizing the pseudo-cursor (aka Quirky Update):

    (please READ AND UNDERSTAND the article mentioned below before...

  • RE: Problem: how to realize custom order

    What I'd really like to understand is the business requirements for producing such a sort...

    Currently, all I can think of is a ...

    (I just can't bring myself to say it...

  • RE: Problem: how to realize custom order

    From what I see....

    Fill up a "group queue" with two groups, in order of the routeCode column.

    Return one row from each group, in order of the routePos column.

    If one of...

  • RE: Problem: how to realize custom order

    For those willing to play with this, here is the OPs sample data from the first post in readily consumable format.

    DECLARE @test-2 TABLE (

    customerId INTEGER,

    routeCode INTEGER,

    ...

  • RE: Are the posted questions getting worse?

    Need an app that adds an "unused" folder to your system, takes a screen shot of the desktop, moves all icons to the unused folder, and replaces the background with...

  • RE: sub query or self - join (or perhaps both ??)

    GSquared (3/25/2011)


    The CTE version will work. My first instinct was a simple Inner Join between two iterations of the table.

    Like so...

    SELECT t1.*,

    ...

  • RE: sub query or self - join (or perhaps both ??)

    How's this?

    WITH cte AS

    (

    SELECT *

    FROM PS_TestForOnline

    WHERE diag = 'D12.3'

    AND position > 1

    )

    SELECT t1.*,

    diag2 = cte.diag,...

  • RE: Are the posted questions getting worse?

    Congrats Gail on 25000! (And I think that this is the first major milestone on The Thread reached by a non-US Threadizen! Congrats again!)

    Edit: Added image. Thanks Gianluca for the...

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (3/25/2011)


    Or that Microsoft has traded MS Access for MySQL. Because who needs Access right? 🙂

    Hmm, I like that. It passes the first test... believability.

  • RE: Are the posted questions getting worse?

    Almost at 25,000 posts here on The Thread! At today's rate, we'll hit it tonight.

    Edit: 36 posts to go. (Watch Alvin post the next 36 messages...)

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (3/24/2011)


    As far as bad drivers goes, Las Vegas takes all of the bad habits from all over the country (including many from overseas) and combines them into one place.

    Same...

  • RE: Summarizing showing non criteria data

    It looks like you're trying to get a list of all of the dates in a calendar week, excluding weekends (include Jan 25, but not Jan 29/30)?

    Here's some code that...

  • RE: Need Records from strings

    Jeff Moden (3/23/2011)


    parthi-1705 (3/23/2011)


    Try this,

    CHARINDEX will help u

    CREATE TABLE #abc_tmp

    (Path nvarchar(850))

    insert into #abc_tmp values('rptclientrifvdistrictgrantstatuschangelog_MillmanR_9dfb3dfa-081b-48d1-8bbf-81361bbd9cb9')

    insert into #abc_tmp values('rptclientrifvdistrictgrantstatuschangelog_MeiA_e472f742-c6a3-4a70-822e-1c5417efb293')

    insert into #abc_tmp values ('rptclientrifvglobalgrantproposalbytrackingnumber_BateyK_23eafa59-e222-462d-a08c-27ed8131c274')

    Select SUBSTRING(Path,0, CHARINDEX('_',Path) ), * from #abc_tmp

    DROP TABLE #abc_tmp

    VERY...

  • RE: Developer making me look ignorant

    Craig Farrell (3/23/2011)


    opc.three (3/23/2011)


    2. Use EXEC...AT:

    Another technique I have found useful is to use the EXEC...AT expression because it let's you use a variable and you can still pipe the...

  • RE: Selecting entries with non-distinct ID

    Pam,

    Actually, I think you wrote a pretty good query.

Viewing 15 posts - 1,636 through 1,650 (of 5,590 total)