Forum Replies Created

Viewing 15 posts - 3,151 through 3,165 (of 4,085 total)

  • RE: Japnese char in XML

    Try using .value() instead of .query. I think that the .query may have an implicit conversion to varchar in it somewhere. With the .value, you can specify an...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Update using subquery help!

    He also has a valid point here. We already know that there was a problem with multiple records being returned and both the subquery and the merge will raise...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need help regarding displaying data

    I think that this performs better, because it only requires one scan of the table instead of two.

    SELECT * FROM #tmp

    ORDER BY ROW_NUMBER() OVER( PARTITION BY Gender ORDER BY Name...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: parse string

    It's "next" as in "following", not "next to" as in "adjacent". That still doesn't explain what to do with the "][", since the following character doesn't have an uppercase...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Summary/Filter Counts for a large result set with Paging

    The non-standard WITH CUBE has been deprecated as of SQL 2008 in favor of the standard CUBE(<composite element list>) syntax that was introduced in SQL 2008.

    GROUP BY (Transact-SQL)


    WITH CUBE

    This feature...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Passing Parameter with a wildcard

    themangoagent (5/14/2012)


    Is Cross Apply something that can be used on SQL Server 2000 tables?

    No, it's SQL 2005 or greater.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Alias Exists Subquery

    Just to clarify, here is a quote from BOL (emphasis added).

    Subqueries with EXISTS


    When a subquery is introduced with the keyword EXISTS, the subquery functions as an existence test. The WHERE...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: ADO recordset does not open after executing stored procedure

    Since the error is occurring in your VBA code, not your T-SQL code, you're more likely to get help from a VBA forum.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: CASE

    You can still create a temporary table or table variable that holds this information. It probably isn't as good a solution as incorporating it directly into the database, but...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: CASE

    I think the best way to do this is code it into your table with a foreign key to the overarching corporation. That way you can prevent things like...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: T-SQL took more than 45 minutes, and it still Executing query

    CELKO (5/12/2012)


    We do not use BIT flags in SQL; that was assembly language.

    T-SQL doesn't have a Boolean data type, so I see no problem with using a BIT to represent...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Case statement in where clause (Help)

    The CASE function cannot return a Boolean value. You can either rewrite your query to return a pseudo-Boolean value and then check whether that value is equal to "true"...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Passing Parameter with a wildcard

    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 use UNION ALL...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Left Join Killing Me

    I still don't see any sample data. It's hard to rewrite your view if we don't have data to compare the original results with the revised results.

    Also, please pick...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Passing Parameter with a wildcard

    This problem is almost certainly due to parameter sniffing. Gail has a good article on Parameter Sniffing[/url]

    There are other issues with your code, though. You should use a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,151 through 3,165 (of 4,085 total)