Forum Replies Created

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

  • RE: Case Logic in Join

    You might also want to add the CASE statement as a computed column on your PART table and create an index on that computed column.

    Drew

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

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

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

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

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

  • 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

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

  • 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

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

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

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

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

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

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

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