Forum Replies Created

Viewing 15 posts - 316 through 330 (of 821 total)

  • RE: Create a stored procedure

    happycat59 (10/14/2014)


    I get error

    Msg 156, Level 15, State 1, Procedure my_sp, Line 2

    Incorrect syntax near the keyword 'FROM'.

    because "Column" is a reserved keyword and needs to be delimited if you...

  • RE: How Many Different Random Numbers?

    rabih_karam (9/30/2014)


    I run the query and I got the below result :

    DATABASE Name : Master

    -----------------------------

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713647892126698

    0.713647892126698

    0.713647892126698

    0.713647892126698

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713852854810538

    0.713871487781797

    0.713871487781797

    0.713908753724313

    0.713908753724313

    0.713908753724313

    and if i run it on other DB I ll get the below result

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713852854810538

    0.713852854810538

    0.713852854810538

    0.713852854810538

    0.713852854810538

    0.713852854810538

    so in...

  • RE: How many rows will be returned?

    Triggers on tables execute only if at least ONE row is affected. So, explanation is wrong.

  • RE: Which type of Numbers?

    WOW64, I learned something new!

    😀

  • RE: Merge Targets

    From BOL:

    MERGE

    [ TOP ( expression ) [ PERCENT ] ]

    [ INTO ] <target_table> [ WITH ( <merge_hint> ) ] [...

  • RE: Synonyms 1

    Eirikur Eiriksson (9/7/2014)


    ...but it works for Joe in HR (that's his default schema);-)

    😎

    That's true!

  • RE: Central Respository

    😀

  • RE: What will this query return?

    pmadhavapeddi22 (9/4/2014)


    When I work with CTE, I get this error when I dont give smicolon, so it was easy to answer 🙂

    Thanks for the question

    +1

  • RE: SQL Server 2008 r2?

    What do you mean with "we can use print and exec commands in single query"?

  • RE: DBCC CHECKDB<!-- 864 -->

    Nice question!

    Thanks!

    😀

  • RE: Phantoms and isolation

    I don't like qotd too long.

    But, BOL states that with SERIALIZABLE isolation level:

    Other transactions cannot insert new rows with key values that would fall in the range of keys read...

  • RE: sp_rename and the procedure definition

    sp_rename leave unaltered the definition, (see sys.syscomments)

    create procedure My_proc

    as

    select 1 as a

    go

    SELECT * FROM sys.syscomments

    WHERE object_name(id) = 'My_proc'

    go

    exec sp_rename My_proc,Myproc

    SELECT * FROM sys.syscomments

    WHERE object_name(id) = 'Myproc'

    After the rename the definition...

  • RE: Service Principal Names

    Mighty (8/7/2014)


    Easy one, but just because I installed many SQL Servers that needed Kerberos Authentication.

    +1

  • RE: What was that field name?

    Wonderfull!!!

    It, also, works with subquery:

    SELECT * FROM (

    SELECT MAX(object_id) AS ID,MAX(name) AS NAME FROM sys.objects

    ) AS o

    But in this case it states a wrong type for column NAME(int,null)

  • RE: What was that field name?

    I noticed it for columns, tables and functions, but I happily surprised for star!

    Good!

    😀

Viewing 15 posts - 316 through 330 (of 821 total)