Forum Replies Created

Viewing 15 posts - 31 through 45 (of 152 total)

  • RE: SQL Server''''s Best Practice?????

    One of the major issues with just copying the data folder is that you do not know what state the database is in when you copy the folder. When...

  • RE: Deleting duplicate records

    My preferred method uses some grouping, and direct deletion:

    DELETE FROM tmPunchtimeSummary

    WHERE iTmPunchTimeSummaryId NOT IN

        (SELECT MAX(itmPunchtimeSummaryId)

         FROM tmPunchtimeSummary

         GROUP BY sCalldate, sEmployeeId, dTotalHrs

         )

    This will handle cases...

  • RE: inserting multiple insert statement questions

    I may have read your request incorrectly, but it seemed as if you were asking "If any of the six product names are null, don't insert any of them." ...

  • RE: .tuf file

    Sure, though it's not my info, but from a message posted by an msce:

    http://www.mcse.ms/archive81-2005-5-1633597.html

    The .tuf file is the Transaction Undo File, and is created when performing log shipping...

  • RE: Union Problem

    Feel free. It's in use at several businesses I used to work at. Spread the word...

  • RE: Union Problem

    One more thing to try - replace the LEFT statement by defining the varchar length, e.g.

    convert(varchar(5), min(e.start_time), 108)

    and see if that helps things.

  • RE: Union Problem

    The best way to see what the issue is in this case would be to add in the functionality one step at a time. If you replace the blank...

  • RE: sp_executesql and output parameters errors

    Okay - let's break this down.

    exec @rError = @StoreProc @OutputParameter1 output, @OutputParameter2 output

    Run just this segment, and give the values in @rcError, @outputparameter1, and @outputparameter2.

    --------------------------------------------------------------

    Declare @StoreProc varchar(64)

    SET @StoreProc = '[whatever]'

    Declare...

  • RE: Different query times for same query.

    More importantly, check the location of the data files for each db, and (if these are run on separate instances) then check the individual TempDB locations.

    Also, if these DBs are...

  • RE: Count of trouble_codes per store_id

    I believe I know what you are attempting to accomplish. This code should do what you need:

    CREATE PROCEDURE dbo.usp_trouble_codes

    AS

    SELECT

        table1.store_id,

        SUM(CASE WHEN table2.trouble_code = '102158' then 1 else 0 END) as...

  • RE: sp_executesql and output parameters errors

    The issue is the 2 levels of indirect references to exec sp_executeSQL. Let's see the final statement that is executed - each level of indent indicating another context

    declare @OutputParameter...

  • RE: Issue with a complex select statement

    I would look at RAM, RAM usage, Disk space free, and disk utilization. If this server and its test server have less RAM available for SQL Server, then you...

  • RE: xp_cmdshell zipping back ups?

    As I noted above - from BoL:

    When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed server role,

         xp_cmdshell will be executed under the...

  • RE: Bad performance in TSQL

    Try adding "WITH RECOMPILE" to the stored procedure definition, and see if that corrects the issue.

  • RE: Parsing a Text field using TSQL

    Unfortunately, the rows include some with Text of over 30kb size. So, although this would work for about 65% of the rows, I am still stymied as to how...

Viewing 15 posts - 31 through 45 (of 152 total)