Forum Replies Created

Viewing 15 posts - 361 through 375 (of 819 total)

  • RE: OPENQUERY-1

    Mikael Eriksson SE (3/17/2014)


    Carlo Romagnano (3/17/2014)


    Mikael Eriksson SE (3/17/2014)


    I guess the reason for the rollback is that the output clause is not allowed when you do remote queries.

    Using a query...

  • RE: OPENQUERY-1

    Thomas Abraham (3/17/2014)


    Thanks for the question, Carlo.

    Don't know which is more interesting - the option for -1 rows, or the fact that 3% selected it as their answer!

    :-D:-D:-D:-D

    Unbelievable, but true!

  • RE: OPENQUERY-1

    Stewart "Arturius" Campbell (3/17/2014)


    Interesting question, thanks

    wouldn't the correct way to handle deletions from a remote server be

    DELETE OPENQUERY(MyServer,'SELECT * FROM tempdb.dbo.a')

    In this case, you haven't the DELETED.* resultset.

  • RE: OPENQUERY-1

    Mikael Eriksson SE (3/17/2014)


    I guess the reason for the rollback is that the output clause is not allowed when you do remote queries.

    Using a query like this will show the...

  • RE: Schema & Renaming Fun

    palotaiarpad (3/12/2014)


    Hmmm.

    According to BOL 'not.funny' should be treated as a failure:

    [ @newname = ] 'new_name'

    Is the new name for the specified object. new_name must be a one-part name and must...

  • RE: Schema & Renaming Fun

    "Schema cannot be named Not" ?????

    "It could be said the table is not funny" ????

    Bad wording?

  • RE: View My Definition

    free_mascot (3/6/2014)


    Good one, Andy. Thanks.

    +1

    😉

  • RE: View My Definition

    Koen Verbeeck (3/7/2014)


    Nice question, but I believe "not connected as sysadmin" is an equally correct answer though.

    ps: no actual connections to a certain Grant who is always ranting? 😎

    From BOL:

    The...

  • RE: EXCEPT 2

    Hany Helmy (3/3/2014)


    I guess there is something wrong with this question as it should be like follows:

    SELECT X AS 'Except'

    FROM A

    EXCEPT

    SELECT Y

    FROM...

  • RE: EXCEPT 2

    Igor Micev (3/2/2014)


    Question is identical with that of 2014/02/26.

    The answer is also identical.

    Am I missing something?

    +1

    But where is EXCEPT-1?

    Why, if the qotd is identical to that of 2014/02/26, somebody got...

  • RE: Intersecting - 1

    Curious: the winner is?

    "EXISTS" with absolute less reads.

    SET STATISTICS IO ON

    GO

    SELECT DISTINCT x AS 'EXISTS'

    FROM A

    WHERE exists(SELECT...

  • RE: Intersecting - 1

    Equivalent to:

    SELECT X AS 'Intersecting'

    FROM A

    JOIN b ON b.y = a.x;

    It's not equivalent, INTERSECT returns DISTINCT values.

    SELECT DISTINCT X AS 'Intersecting'

    FROM A

    JOIN b ON b.y = a.x;

  • RE: Intersecting - 1

    First time I see 99% OK.

    😀

  • RE: Stored Procedure Boundaries

  • RE: Stored Procedure Boundaries

    GO is NOT a statement, but a batch separator. It is recognized only by SSMS and you can change it. E.g. you can change with RUN_BABY.

    This statement confirms it:

    execute ('

    SELECT...

Viewing 15 posts - 361 through 375 (of 819 total)