Forum Replies Created

Viewing 15 posts - 706 through 720 (of 825 total)

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

  • RE: More Triggers

    I prefer multiple triggers. But, it's easier to fall in recursive triggers.

  • RE: More of computed columns

    To get values from other tables or columns of the same table but different row, you should use a function:

    CREATE TABLE [dbo].[a2]

    (

    [a1ID] [int] NULL,

    [col3] AS (a1ID^2)

    )

    GO

    create function get_a2_col3(@a1id int)

    returns int

    as

    begin

    ...

  • RE: Database Snapshot

    Maybe an attempt to introduce trinary logic? Or should the third option have been NULL? 😉

    Please, do not start a discussion about NULLs. 😀

  • RE: Database Snapshot

    Hugo Kornelis (11/9/2010)


    Nice, easy question.

    I was wondering about the inclusion of the "none of the above" option. Was this just a joke from the question author, or will people actually...

  • RE: Predict the total count

    Don't forget Mayan calendar! Some two years to go, and ...

    😀

    I agree! :-D:-D:-D

  • RE: Predict the total count

    So when the conversion into floats and then taking ceiling of the values, these 2 records generate the same values.

    I disagree with explanation, it's enough to convert to INT

    Select...

  • RE: A Faster BETWEEN Dates

    Hello, terrance

    May you explain this syntax?

    I think it is very dangerous to transfer search condition in the WHERE clause,

    because you can alter result of "LEFT JOIN" that becomes a pure...

  • RE: Incremental additions

    I think the question author tried to confuse us with the syntax for compound operators

    I think the question author CONFUSED himself with the syntax for compound operators, as you...

  • RE: Incremental additions

    So it seems that the explanation of the question is wrong, as it states that the pre-increment operator is not used in SQL Server. SQL Server uses however a compound...

Viewing 15 posts - 706 through 720 (of 825 total)