Forum Replies Created

Viewing 15 posts - 3,466 through 3,480 (of 4,085 total)

  • RE: error message for t-sql query

    It means pretty much what it says. You don't have a table named or aliased "table3" in your query. You can't reference a column in a table that...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Get Data from XML Nodes for multiple rows

    XML is case-sensitive. That appears to include the .nodes() function.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: T-SQL QUERY TO RETURN SOME DATA

    Cadavre (11/23/2011)


    Ahhh, beaten to the punch.

    Not necessarily. On my sample data, using IN outperforms using NOT IN by a significant margin. I assume that this will mainly be...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Replace CASE with PIVOT

    New does not necessarily mean better. (In fact with MS it often means buggy.) Jeff Moden shows in his article

    Cross Tabs and Pivots, Part 1 – Converting...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Loop through multiple tables

    memymasta (11/23/2011)


    The logics is we need to loop through every user to send email to each one. Also we need to loop through items so we can add them to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating Percentage using a CTE Or with a COUNT(*) OVER Clause

    Welsh Corgi (11/22/2011)


    The following does not right justify the percentage:

    Justification is a presentation issue and should be handled by the presentation layer not in T-SQL.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating Percentage using a CTE Or with a COUNT(*) OVER Clause

    100.00 * Sum(Sale)/NULLIF(Sum(Quote), 0)

    This makes sure that you are not performing integer division and also produces a null result when Sum(Quote) is zero.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Two databases - same instance - query both

    Bron Tamulis (11/22/2011)


    select

    NBXWEB.dbo.RBI_POReceipts.PONUM,

    NBXWEB.dbo.RBI_POReceipts.Vendor,

    NBXWEB.dbo.RBI_POReceipts.RecDate,

    NBXWEB.dbo.RBI_POReceipts.SKU,

    NBXWEB.dbo.RBI_POReceipts.QtyReceived,

    NBXWEB.dbo.RBI_POReceipts.ReadByGP,

    RBI.dbo.BT_POP_QTY_REMAIN.REMAIN

    from NBXWEB.dbo.RBI_PORECEIPTS FirstAlias

    Left outer Join RBI.dbo.BT_POP_QTY_REMAIN SecondAlias

    ON FirstAlias.PONUM = SecondAlias.PONUMBER and FirstAlias.SKU = SecondAlias.ITEMNMBR

    Once you define an alias on the table any...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: YTD Summary report

    The first step is to choose the correct tool for the job. In this case, the correct tool is reporting software, such as SSRS, not T-SQL. This kind...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: help with multi-path hierarchical data

    Mark-101232 (11/22/2011)


    I think this is known as a directed graph

    In order for the recursive CTEs to work, it actually needs to be a directed acyclic graph, i.e., it can't have...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Delete data from SQL using Excel 2010

    Excel is a spreadsheet program, not a database program. It makes a terrible database program.

    Excel is a spreadsheet program, not a user interface design program. It makes a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query xml column

    Remember what i said about relative paths? All of your paths are absolute. (They start with a '/'.) You need to use relative paths. The '.',...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Issue with multi selection option in dropdown list

    Yes, it's a T-SQL question, but you posted in both the T-SQL (SS2K5) and the T-SQL (SS2K8) forums. I assume you know whether your server is SQL 2005 or...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Issue with multi selection option in dropdown list

    Duplicate post. Please post responses here: http://www.sqlservercentral.com/Forums/Topic1207598-392-1.aspx

    Please don't cross-post. It fragments the discussion.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Pivot table query - making it dynamic

    terryshamir (11/17/2011)


    The reporting software is Excel. the people using do not have the skills (neither do I or do I want to learn) to do a pivot table but most...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,466 through 3,480 (of 4,085 total)