Forum Replies Created

Viewing 15 posts - 1,291 through 1,305 (of 1,554 total)

  • RE: Listing domain users not part of any user-defined databases

    I believe what you're looking for is sp_helplogins

    Have a look in BOL for more info on this proc

    /Kenneth

  • RE: Populating @Variables dynamically

    You can't declare your own global variables in Transact-SQL.

    If you do;

    DECLARE @global - you get a local variable named 'global'..

    If you do;

    DECLARE @@global - you get a local variable named...

  • RE: Populating @Variables dynamically

    Someone said;

    "Keep us posted on your code, there isn't enough in these forums on dynamic sql......."

    I beg to disagree - it's way way too many questions on dynamic sql in these forums....

  • RE: Using Count is a Proc

    Just to supply some variation

    If the only criteria is 'rows from order where the same ordernumber is in more than one row', then...

  • RE: Problem with DELETE stmt

    Agreed - it has the potential to trip some unwary feet. Tonge-in-cheek is required (as well as some 'sanity checks' like plain selects to verify the 'target area')

    /Kenneth

  • RE: Problem with DELETE stmt

    Maybe that was the intention, but as it was presented as the actual SQL executed, it boils down to a batch of two statements rather than one.

    With some commenting the...

  • RE: Populating @Variables dynamically

    You may also want to read this nice page http://www.sommarskog.se/dynamic_sql.html entitled 'The Curse and Blessings of Dynamic SQL' - if for nothing else to verify that what you're doing is...

  • RE: "Datetime" and "ISDate"

    Well, it does insert just well when I tried it.

    Maybe I should point out that you don't have the string "01/23/1234" anywhere in your example, since your variable for storing...

  • RE: Problem with DELETE stmt

    Perhaps you should thank your lucky star the log got full. The SQL written isn't quite what you wanted to do..

    Delete tblMMStanTestScores

    Select TS.Grade, TS.TestShortName, TS.Permnum, TS.SA, TS.InsertDate

    From tblMMStanTestScores TS

    Inner Join...

  • RE: "Datetime" and "ISDate"

    Yes, 1) is correct. That is how datetime datatype is implemented in SQL Server.

    2) Well, this is expected. Your datestring for the test is '01/23/12', which by all means conforms...

  • RE: Open-ended querying of DB (???)

    Imho, letting users have the "freedom" of creating/generating their own ad-hoc queries demand a certain level of expertize from the users. If they don't have this, they shouldn't be allowed...

  • RE: Most efficient inner join

    Most likely the answer is yes for equi joins - there is no difference in having the second criteria in the ON clause or the WHERE clause.

    For outer joins the...

  • RE: Known bug or is there a reason?

    Apologies for being unclear, my mind was in 'generic' SQL mode, not SQL Server specific 

    My intention was to say;

    How rows are physically stored does not necessarily guarantee in...

  • RE: Previous months information

    Antares solution is very slick, though it may be difficult to understand how it works and hard to read if you don't know how the functions involved work in this 'special' case.

    Another...

  • RE: Known bug or is there a reason?

    The requirement to state 'order by' if you want to guarantee a certain order in the result has always been there - it has not been added by MS.

    Only bozos...

Viewing 15 posts - 1,291 through 1,305 (of 1,554 total)