Forum Replies Created

Viewing 15 posts - 3,121 through 3,135 (of 4,085 total)

  • RE: Query help

    You might want to look up the DATENAME() function for the month names and the DATEPART() function for the quarters. Or you might want to use a calendar table...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: get the actual password from aspnet_memberships

    This is simply no valid reason to read stored passwords. Even if it were possible, providing the capability to do so would create a huge security risk.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Getting an error Msg 512, Level 16, State 1

    Unlike some MS error messages, this error is fairly self-explanatory. One of your subqueries is returning multiple values and that is not allowed. Specifically, the following subquery is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Generate Statistical Number Series

    Use tally tables to count instead of rCTEs. Jeff has a good article about this: Hidden RBAR: Counting with Recursive CTE's[/url]

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Using a CASE statement...possible to Group By?

    If you want to display the results of the CASE expression and use it in a GROUP BY, you can use a CROSS APPLY to define and alias the CASE...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help with Unpivot (or similar)

    UNPIVOT will not work for your query, because it will only produce one unpivoted column per statement, and you need three. You can use a CROSS APPLY to make...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Pulling Data out of a Cube

    Name Queries are usually defined against the OLTP source that the OLAP cube is built on. The named query will use T-SQL, but the cube will use MDX. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Aggregates on the right side of an APPLY cannot reference columns from the left side.

    Use a CTE or derived table.

    The CROSS APPLY isn't going to give you what you expect anyhow--which is probably why MS put in that error message in the first place....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Pulling Data out of a Cube

    First, there is a separate forum for Analysis Services. You are more likely to get an answer to your question there.

    The cube browser in BIDS (Visual Studio) is a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need help on transposing rows into columns

    Consider SSRS for your reports. It has built-in functionality to automatically handle these types of reports.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: DATEADD and leap years

    dwain.c (5/29/2012)


    Datetime functions do have their issues though, like the following:

    SELECT DATEADD(month, 1, '2012-02-29')

    Depending on your point of view, the results this returns looks wrong, or maybe not. I...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Frustration with FOR XML

    Actually I realized that my FOR XML AUTO code didn't have the Employees node. Here is corrected code.

    FOR XML AUTO

    SELECT Company.Company_ID, Company.Company_Name, Employees.Placeholder, Employee.Employee_ID, Employee_Name

    FROM Companies AS Company

    CROSS APPLY...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Frustration with FOR XML

    Part of the problem is that you are using FOR XML AUTO. It is usually much easier to construct the necessary XML structure using FOR XML PATH with nested...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Dynamically Export to new Excel File - TSQL

    A brief overview.

    In SSIS, create an ADO recordset with the managers and then use a FOR EACH ADO enumerator container to produce the Excel file for each manager. The...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Passing Parameter with a wildcard

    Jeff Moden (5/25/2012)


    drew.allen (5/14/2012)


    Sean Lange (5/11/2012)


    themangoagent (5/11/2012)


    Jeff Moden (5/10/2012)


    Didn't look to see if it was mentioned before but one sure fire way to increase the performance here would be to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,121 through 3,135 (of 4,085 total)