Forum Replies Created

Viewing 15 posts - 1 through 15 (of 25 total)

  • RE: How to send mail from a contained database is SQL Server using Database Mail?

    The main problem was that mapping the user in the contained database to an SQL Server login was not an option, it had to be contained as well. Meanwhile, I...

  • RE: Inconsistency between sys.database_files and sys.master_files

    I can't remember anything we did to fix that but after a quick check the issue isn't present anymore, so someone obviously did manage to put things right.

  • RE: To TOP or not to TOP?

    Thanks for the thorough explanation, Paul. Finally, we've got an answer for both 'where' and 'why'. As this is only used in a development tool and it's quite salient when...

  • RE: Foreign key

    Bill Wehnert (5/18/2012)


    Table 3 doesn't get created because there is no PK defined on Table2, you can't reference another table without their being a PK.

    It does not have to be...

  • RE: To TOP or not to TOP?

    Yes, it's not the ordering that fails here. Barry clarified quite a few things that was unknown for me but he wasn't saying he is addressing that part of the...

  • RE: Foreign key

    Yeah, tricky question that bled me to death 🙂 I knew that creation of the third table would have some issues but I still voted for three being created and...

  • RE: To TOP or not to TOP?

    Yes, a few things got clear! I've learnt many things today 😎 I'm glad I asked 🙂

  • RE: To TOP or not to TOP?

    Though the intended use might not be that way, the article doesn't deny it either. Nevertheless, I hope you agree that this undocumented function is useful and that it should...

  • RE: To TOP or not to TOP?

    And the rest of us will just sit back and watch you fencing 🙂 And drink to knowledge you spill 😉

  • RE: To TOP or not to TOP?

    That's what I had in mind to try. You spared me some typing, Mike, thank you very much 😉

  • RE: To TOP or not to TOP?

    HowardW (5/17/2012)


    Fair enough, but it's not a bug, it's an unreasonable expectation that the internal query processor works in a way that you can use it for running procedural code...

  • RE: To TOP or not to TOP?

    HowardW (5/17/2012)


    The problem here is you're relying on an undocumented and unreliable use of variable assignment in a select statement.

    There's absolutely no guarantee that the variable assignment will occur in...

  • RE: To TOP or not to TOP?

    michael vessey (5/17/2012)


    how did you come to the step of using TOP 1000000?

    Yes, I compared the exec plan as well, but I did not find anything meaningful. Tried a few...

  • RE: To TOP or not to TOP?

    srikant maurya (5/17/2012)


    Can you tell me what is use of statment

    RANK() OVER( PARTITION BY t.[name] ORDER BY c.column_id DESC ) = 1

    Sure. This query is a part of a...

  • RE: To TOP or not to TOP?

    michael vessey (5/17/2012)


    i took the data from the query into a temp table and then did the

    select @sql=@sql+mytext from #res

    print @sql

    works fine

    I'll implement that as a workaround until someone...

Viewing 15 posts - 1 through 15 (of 25 total)