Forum Replies Created

Viewing 15 posts - 2,311 through 2,325 (of 3,232 total)

  • RE: Users getting timeouts

    A great place to start would be to have someone notify you as soon as the users start to get the timeout messages and then for you to run SQLDiag.exe. ...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: stored proc in a function

    Have you tried it?  Only functions and extened stored procedures can be executed from within a function.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Stored procedure Complexity

    I'm pretty sure that somewhere in the last thread that you posted on this topic, someone posted code to perform the loop as Lynn describes. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: What do I monitor to prove the server needs more memory

    I'll agree that Page Life Expectancy is a good measure of memory pressure.  Values consistently below 300 represent a possible memory bottleneck.  I usually look at this along with Lazy...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Determining query speed

    If you are running your query through Query Analyzer, run SET STATISTICS TIME ON prior to running the query.  I would also recommend running DBCC FREEPROCCACHE, DBCC DROPCLEANBUFFERS, and SET...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: xp_cmdshell alternatives

    For what it's worth, I just implemented this solution around 6 weeks ago for a client.  It was easy to taylor to their needs and it has been running great...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: function for delimiters

    declare @r varchar(30)

    select @r = dbo.GetToken (dbo.GetToken ('VA Beach, VA 23542', ',',2), ' ',2)

    select @r

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Passing a Variable to Varchar(#)

    You cannot use a variable to define the length of a varchar() datatype.  A varchar() is variable in length by nature.  What datatype is B.OCCUSEQNO?  Define your varchar large enough...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: xp_cmdshell alternatives

    Scott,

    This is not an answer to your question, but there is already a great custom log shipping solution here on SSC that may save you quite a bit of...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Splitting String

    You could also search SSC for the word 'split' and find a few examples of how to use a Numbers table with a table valued 'split' function. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: This just doesn''''t sit right with me...

    The best way to find out why they coded something a certain way is to ask them.  What I have found is that, most of the time, there is...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Splitting String

    Add an identity column to your table function table.  For example:

    CREATE FUNCTION dbo.udf_parse_string_into_integer_table

    (@parseString varchar(8000)=null)

    RETURNS @parsedstring TABLE (ID int IDENTITY(0,1), splitstring int)

    as

    begin

    declare @pos int

    declare @splitstring varchar(255)

    declare @strlen int

    select @strlen =...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: How 2 get count(*) when table name in variable?

    Well, the piece that's causing you problems here is your table name.  You cannot use a variable in the FROM clause of a DML statement.  So your existing syntax would...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Adding date timestamp to a backup file name

    Lynn, your version works perfect too.  It's just a matter of preference (and the fact that I had already had mine ready to post and your post beat me to...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Adding date timestamp to a backup file name

    Or, if you want to remove the dashes as well:

    DECLARE @BackupFileName varchar(100)

    SET @BackupFileName = 'C:\temp\TestDB_' + REPLACE(REPLACE(REPLACE(CONVERT(varchar,GETDATE(), 20),'-',''),':',''),' ','') + '.BAK'

    BACKUP DATABASE TestDB

    TO <A href="mailto