Forum Replies Created

Viewing 15 posts - 2,476 through 2,490 (of 4,086 total)

  • RE: Understanding a Odd JOIN

    thomashohner (8/9/2016)


    Thanks guys I had just never seen it before and so the syntax threw me. It makes sense now. Thanks !!

    INNER JOINs and CROSS JOINS are associative, so...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Understanding a Odd JOIN

    thomashohner (8/9/2016)


    This may not seem odd to many, but it is the first time I have seen it and I need to rework it in such a way that I...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Table with multiple field ID's with different values

    Please post sample data and expected results as in the first link in my signature.

    That being said, if you want to find a value base on the MAX/MIN of another...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL Joins

    Luis Cazares (8/9/2016)


    It's not about one join being better than the other. It's about using the correct join for each query.

    Here's an explanation on how each join works.

    http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins

    +1 on this....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Select within Case Statement

    tstagliano (8/9/2016)


    I have the following select statement where i am trying to pull period Revenue along with Total Revenue for engagements. The Rev_main table has a period column so...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding related records within the same table

    Okay, after looking at the other code posted, it looks like Lynn's code will work only with paths. My code will work with all directed acyclic graphs. A...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding related records within the same table

    Here are the two queries that I was alluding to. The first one starts with the original stakeholders and moves down the tree. Then you filter based on...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Varchar to money\decimal

    You've rewritten a CASE statement in about as obscure a way as possible.

    -- Your version

    ISNULL(CAST(NULLIF(ISNUMERIC(@deposit), 1) AS money), @deposit)

    -- The straightforward version

    CASE WHEN ISNUMERIC(@deposit) = 1 THEN CAST(@deposit as money)...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding related records within the same table

    Hugo is right that my approach may have a lot of reads, but there is a modification to my approach that will have many fewer reads, but it first requires...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    I'm getting frustrated. http://www.sqlservercentral.com/Forums/Topic1807080-391-1.aspx

    Drew

    Edited to place the bold tags outside of the url.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding related records within the same table

    sku370870 (8/5/2016)


    drew.allen (8/5/2016)


    sku370870 (8/5/2016)


    Thanks for your reply. But when I am on any particular stage, all I have to hand is the StakeholderID for that stage - so I can't...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query Suddenly Performing Badly

    lmarkum (8/5/2016)


    I forgot to mention that in these plans there will be a missing index recommendation on the NewsletterHistory. I don't understand the recommendation because the only place I...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding related records within the same table

    sku370870 (8/5/2016)


    Thanks for your reply. But when I am on any particular stage, all I have to hand is the StakeholderID for that stage - so I can't start with...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: remove duplicate values in a view , without affecting main tables

    joanna.seldon (8/5/2016)


    hi

    this works brill within my view

    , ROW_NUMBER() OVER(PARTITION BY a.StudentID

    ORDER BY CASE WHEN b.[VehicleType] = 'CAR' THEN 1...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: help needed with sql update

    Since you're on SQL 2012, look at LAST_VALUE.

    Drew

    Edited: Added hyperlink.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 2,476 through 2,490 (of 4,086 total)