Forum Replies Created

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

  • RE: Output of one command as input to another command

    Insert results from xp_Fixeddrives into a temp table as such:

    CREATE TABLE #DriveTable (Drive CHAR(1), [MB Free] int)

    INSERT INTO #DriveTable

    EXEC master..xp_fixeddrives

    SELECT *

    FROM #DriveTable

    DROP TABLE #DriveTable

     

    Now, use t-sql to query the...

  • 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. ...

  • RE: stored proc in a function

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

  • 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. 

  • 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...

  • 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...

  • 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...

  • RE: function for delimiters

    declare @r varchar(30)

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

    select @r

  • 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...

  • 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...

  • 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. 

  • 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...

  • 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 =...

  • 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...

  • 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...

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