Forum Replies Created

Viewing 15 posts - 58,696 through 58,710 (of 58,875 total)

  • RE: convert int to smallint

    I agree with Steve... trap for errors if you are goin to build your own T-SQL to do this.  If you use Enterprise Manager to make the table design change,...

  • RE: Problems creating a index on view

    You'd be better off to run the SQL from the view in Query Analyzer once with the Index Wizard to create indexes on the underlying tables of the view.

  • RE: The letter N?

    >Does this necessarily mean that if I know my application(s) are only going to be used in the US, and won't ever need any other locale, I should save the...

  • RE: run job schedule evry 20 second HOW

    Perhaps you could have a stored procedure that runs continuously (loop back to start) with a WAIT DELAY '000:00:20'.  That would solve the problem of trying to schedule a job...

  • RE: Deadline Tomorrow - Limiting the zero value in averaging a row of data

    Karen,

    Bob and I both made the same boo-boo... in the code where the fields get added up, you must include all of that addition in parentheses or you'll get the...

  • RE: Deadline Tomorrow - Limiting the zero value in averaging a row of data

    There's many ways to do this but most will involve a loop or a (yeeeeech!) Cursor (Haaaaaack... Patooooooiiiii!), a temp table, or maybe some extra columns added to your existing...

  • RE: Gathering Year-to-Date Info

    Beryl,

    Borrowing on Kathi's idea, this may run a bit faster because it does no string manipulation or conversion and only has one comparson operator (=).  And it could easily be...

  • RE: Get sp names who is using given table name

    I agree that dependencies related tables are (more or less) unreliable but the SYSOBJECTS and SYSCOMMENTS tables are always up to date with the latest code for any given object.  The...

  • RE: Stored Procedure :: Multiple Users

    You may want to avoid using the guest account for several reasons... here's what the MSDN link that yoav provided warns of...

    "Avoid using the guest account; all logins without their...

  • RE: Problem with UPDATE Using IN

    >Colleague put a trigger on the table that was causing the error.

    Paully21,

    There may be a much larger problem lurking in the shadows of that trigger you found... many folks write...

  • RE: Get sp names who is using given table name

    This code also works... Like the code that Kenneth posted, you should be made aware that if the, say, stored procedure is longer the 8k bytes and the table name...

  • RE: Return the value of @@IDENTITY - best way?

    You bet, Gazley... BOL tells you EVERYTHING and sometimes it's much more than you need (although, I always start there) or can be difficult to draw a conclusion from.  It...

  • RE: Return the value of @@IDENTITY - best way?

    John,

    SCOPE_IDENTITY() does require the use of parentheses like GETDATE() does.  I didn't see them in the code you posted and I'm hoping that was the only problem you had.

  • RE: Return the value of @@IDENTITY - best way?

    Gazley,

    The reason I said that using @@IDENTITY in the presence of triggers is "Death by SQL" is because of the way @@IDENTITY works... it (basically) returns the IDENTITY of the...

  • RE: using variables as tablenames?

    Like I said, Joe... all of your explanations are spot on and I agree with telling folks of the dangers that lurk out there... but there's two ways to tell...

Viewing 15 posts - 58,696 through 58,710 (of 58,875 total)