Forum Replies Created

Viewing 15 posts - 691 through 705 (of 819 total)

  • RE: Unique constraint on a nullable column

    tommyh (12/2/2010)


    There is no **** way that "By adding a where clause in ALL inserts that checks for the existence of new value in the table" is a fix to...

  • RE: sys.syscomments

    I disagree: the query returns all rows that contains the word 'order' in the column [text] that may appear in comments or definition.

  • RE: temp table in sysobjects

    Carlo Romagnano (11/22/2010)


    WayneS (11/22/2010)


    BTW, the best way to check for the existance of a temporary table in your current session is:

    IF OBJECT_ID('tempdb..#YourTempTable') IS NOT NULL

    Note that in SQL Server thru...

  • RE: temp table in sysobjects

    WayneS (11/22/2010)


    BTW, the best way to check for the existance of a temporary table in your current session is:

    IF OBJECT_ID('tempdb..#YourTempTable') IS NOT NULL

    Note that in SQL Server thru version 2008R2,...

  • RE: temp table in sysobjects

    vk-kirov

    That's true!

    I ran it on sql2000 sp4.

  • RE: temp table in sysobjects

    vk-kirov (11/22/2010)


    Carlo Romagnano (11/22/2010)


    Also this is wrong:

    If you used a query like this, you would see your table:

    You will see ALL tables that begins with '#testvm', also, tables belonging...

  • RE: temp table in sysobjects

    Also this is wrong:

    If you used a query like this, you would see your table:

    You will see ALL tables that begins with '#testvm', also, tables belonging to other sessions.

  • RE: Conditional Order By

    Hugo Kornelis (11/17/2010)Without the reversal, the question would have been a solid test of whether people know about the dangers of using CASE in ORDER BY, and thus an excellent...

  • RE: Conditional Order By

    mister.magoo (11/16/2010)


    Thanks to those of you who appreciate this question.

    To those who think it had unnecessary "tricks" in it, I did try several variants of this question and they all...

  • RE: Conditional Order By

    tommyh (11/16/2010)


    Carlo Romagnano (11/16/2010)


    I should remember implicit cast using CASE clause.

    Good question. I refreshed implicit cast.

    In sql2000, it gives error also with SET @sortby='Date1'. (Syntax error converting datetime from character...

  • RE: Conditional Order By

    I should remember implicit cast using CASE clause.

    Good question. I refreshed implicit cast.

    In sql2000, it gives error also with SET @sortby='Date1'. (Syntax error converting datetime from character string.), not in...

  • RE: Query text during caching in SQL 2005

    Oleg Netchaev (11/15/2010)


    Carlo Romagnano (11/14/2010)


    In sql2005, I get an error:

    "plan_handle" is not a recognized table hints option.

    Carlo,

    Please check compat level of your SQL Server 2005 AdventureWorks database. If the level...

  • RE: Query text during caching in SQL 2005

    Execute the batch without the 'GO'

    EXEC uspLogError

    SELECT st.text QueryText,objtype

    FROM sys.dm_exec_cached_plans

    CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st

    WHERE text LIKE N'%uspLogError%'

    Result:

    CREATE PROCEDURE [dbo].[uspLogError] ....,'Proc'

    EXEC uspLogError SELECT st.text QueryText FROM...

  • RE: Query text during caching in SQL 2005

    Very bad worded question:

    Query text during caching in SQL 2005

    This is related to SQL Server caching. What should be the output of following T-SQL query:

    USE AdventureWorks2008R2

    GO

    EXEC uspPrintError

    GO

    SELECT st.text QueryText

    FROM sys.dm_exec_cached_plans...

  • RE: More Triggers

    Jeff Kunkel-812485 (11/12/2010)


    Happy Friday All!!!

    However, as I mostly support another vendors databases, I am seeing more developers move the business logic into the application code and out of stored procedures...

Viewing 15 posts - 691 through 705 (of 819 total)