Forum Replies Created

Viewing 15 posts - 6,511 through 6,525 (of 10,144 total)

  • RE: self teaching newbie needs help please...

    Here's a wee script to get the ball rolling. No PK's / FK's yet (or even indexes), and not even fully normalised, but simple enough to use as a framework...

  • RE: self Join [Help Required]

    arslantalib (10/27/2011)


    thanks for your response, problem is still not solved with my actual data,

    can you please give your email, so i can send you my actual data...

    VSP (10/12/2011)


    I may have...

  • RE: Are the posted questions getting worse?

    Gianluca Sartori (10/27/2011)


    ChrisM@Work (10/27/2011)


    Gianluca Sartori (10/27/2011)


    ChrisM@Work (10/27/2011)


    Gianluca Sartori (10/27/2011)


    Strange coincidence!

    ...

    Nah - you're strange, I'm a coincidence ๐Ÿ˜›

    :hehe: Quite right.

    Had to post - now we're even again

    It's an inglorious battle for...

  • RE: Retrieving status from history

    This is probably more efficient:

    SELECT

    O.OrderID,

    l.StatusID,

    l.StatusDate

    FROM Orders O

    INNER JOIN (

    SELECT *, rn = ROW_NUMBER() OVER(PARTITION BY OrderID ORDER BY StatusDate)

    FROM OrderStatusLog

    ) l ON l.OrderID = o.OrderID AND l.rn...

  • RE: Are the posted questions getting worse?

    Gianluca Sartori (10/27/2011)


    ChrisM@Work (10/27/2011)


    Gianluca Sartori (10/27/2011)


    Strange coincidence!

    ...

    Nah - you're strange, I'm a coincidence ๐Ÿ˜›

    :hehe: Quite right.

    Had to post - now we're even again

  • RE: Are the posted questions getting worse?

    Gianluca Sartori (10/27/2011)


    Strange coincidence!

    ...

    Nah - you're strange, I'm a coincidence ๐Ÿ˜›

  • RE: Are the posted questions getting worse?

    Jim Murphy (10/26/2011)


    ... Aaahhh. It's sweet. Now I can grant permissions to both my wife (at home), and my receptionist (at work)...Jim

    What!!! How rude!

  • RE: Summation of amount in T-Sql

    Here's the OUTER APPLY version Remi's talking about. It's cleaner, easier to read, and likely to be more performant:

    SELECT m.LastName,

    p.PledgeTotalPerIndividual,

    ps.LTVTotalPerIndividual,

    ps.RoRTotalPerIndividual,

    t.OfferingTotalPerIndividual,

    t.TitheTotalPerIndividual,

    t.SeedOfferingPerIndividual

    FROM dbo.Members AS m

    OUTER APPLY (SELECT...

  • RE: Summation of amount in T-Sql

    Ninja's_RGR'us (10/26/2011)


    ChrisM@Work (10/26/2011)


    SaintGr8 (10/26/2011)


    Hello!

    Please run the queries below to get along....

    Your script has numerous faults - I'm sure if you fix them and repost, it won't take long to solve...

  • RE: Summation of amount in T-Sql

    SaintGr8 (10/26/2011)


    Hello!

    Please run the queries below to get along....

    Your script has numerous faults - I'm sure if you fix them and repost, it won't take long to solve this.

  • RE: Are the posted questions getting worse?

    L' Eomot Inversรฉ (10/26/2011)


    Do we have a would-be Celko here? A somewhat style-less and inept one, perhaps, but...

    Celko's less personally offensive. This guy would benefit from a warning shot...

  • RE: If or case statement to determine a join

    clarmatt73 (10/26/2011)


    This is the from clause for the query:

    FROM [Transaction] Payments

    INNER JOIN Debt ON Debt.DebtCode = Payments.TransactionDebtCode

    IF @JointDebtor = 'Yes'

    (INNER JOIN DebtDebtor ON DebtDebtor.DebtCode=Debt.DebtCode AND DebtDebtor.DebtorLinkId=ISNULL(TransactionDebtorLinkId,(SELECT MIN(DebtDebtorID) FROM DebtDebtor AS...

  • RE: If or case statement to determine a join

    clarmatt73 (10/26/2011)


    Just re-read my post, the example did not quite show how the joins are written. Please see below:

    (Case When @parameter = 'Yes' THEN

    INNER JOIN Table2 ON Table2.DebtCode=Table1.DebtCode AND Table2.DebtorLinkId=ISNULL(TransactionDebtorLinkId,(SELECT...

  • RE: If or case statement to determine a join

    clarmatt73 (10/26/2011)


    Hi All,

    I have been asked to alter one of our reports so that the end users can select whether to include certain data. The data can only be extracted...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (10/25/2011)


    ...

    So I went with the newly unveiled (as of Sunday), HTC Evo Design.

    I've had two HTC phones, the XDA and the XDA IIs. Both performed really well and...

Viewing 15 posts - 6,511 through 6,525 (of 10,144 total)