Forum Replies Created

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

  • RE: Query help

    Smash125 (6/4/2012)


    Yes i the query is working fine. Only issue i am facing is months are not arranged in sequential order

    ...

    For Quarter3 we can observe August comes first,then July and...

  • RE: Tricky SQL - Please Help

    Adam Machanic (6/4/2012)


    David Moutray (6/4/2012)


    I don't know what was in the Original Poster's mind, but I heard Adam Machanic recommend putting the commas for multi-line statements at the beginning of...

  • 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...

  • 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

  • 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...

  • 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

  • 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...

  • 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...

  • 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. ...

  • 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....

  • 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...

  • 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

  • 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...

  • 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...

  • 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...

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