Forum Replies Created

Viewing 15 posts - 196 through 210 (of 369 total)

  • RE: Any one can send me answers for these

    These appear to be "exam" questions and not a current real-world problem.


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: CTE vs Derived Table

    I'll offer my thoughts on a CTE vs. derived table:

    1. I'll continue to code CTEs as they are simplier and easier to maintain, along with being a bit "self...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: CTE vs Derived Table

    Note: SQL Server 2005 SP2.

    It just so happens that I'm coding a query for an application that was a prime candidate for a CTE as it had a complicated sub-query...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: CTE vs Derived Table

    ggraber (11/12/2008)


    The articles John provided are comparing CTE to Temp Tables which is not a valid comparison.

    I believe that the 1st article by Tony showed that the result set of...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: CTE vs Derived Table

    It depends upon what you are doing. Performance can vary and in certain cases be worse. See the following postings by Tony Rogerson related to performance:

    http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/05/17/non-recursive-common-table-expressions-performance-sucks-1-cte-self-join-cte-sub-query-inline-expansion.aspx

    http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/05/17/non-recursive-common-table-expressions-performance-sucks-2-row-number-is-executed-number-of-cte-references-x-number-of-rows-from-the-anchor.aspx

    Edit: Spelling correction.


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: UNION error

    G² (11/6/2008)


    That's a good point. I hadn't thought of the text specific functions.

    Thanks,

    Greg

    Now you know why just performing an "ALTER TABLE" to change the data type could not be...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: UNION error

    G² (11/6/2008)


    It was my understanding that varchar(max) was meant to be a replacement to the text data type because of the issue that this question raises as well as other...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: UNION error

    Carla Wilson (11/6/2008)


    JohnG (11/6/2008)


    A data type change to a table is NOT a "workaround".

    While I agree that a datatype change to an existing production table may not be a work-around,...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: UNION error

    I agree with "J"!

    Although I had selected "change the data type to varchar(max)" I removed it as the scenario had stated that no duplicates could be assumed. Therefore, the...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: to store an Image in Database

    The sample provided was a syntax example. It would not work against your table. Refer to the Books Online (BOL) and adjust to your table name, column name,...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: CONTAINS(T-SQL) with many variable

    Read the syntax of the CONTAINS clause in the Books Online (BOL): http://technet.microsoft.com/en-us/library/ms187787(SQL.90).aspx

    If you use a variable all terms, including the "OR", in the query specification must be placed in...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: moving a database with full text indexing from sql 2000 to 2005

    The best thing to do is to drop and recreate. This way, you'll be sure that everything is correct under SQL Server 2005.

    You'll also get the opportunity to adjust/change...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: Full Text Indexing

    If I do a query on the column using LIKE %% instead of CONTAINS will SQL Server use the full-text index?

    Short answer: NO

    Long answer: The SQL engine uses various words...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: Best Practice

    I had completely forgotten about this because I never declare more than one trigger for the same action. Frankly, I never really understood why people want to have multiple triggers...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • RE: Best Practice

    Hugo Kornelis (9/5/2008)


    That's why many developers make it a habit to start each trigger with this line:

    IF @@ROWCOUNT = 0 RETURN;

    Do make sure that it's the very first line of...


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

Viewing 15 posts - 196 through 210 (of 369 total)