Forum Replies Created

Viewing 15 posts - 661 through 675 (of 7,429 total)

  • RE: Stored Procedure timing

    Lynn's should work, however this may be a little more simplified

    DECLARE @strCompany varchar(50),

            @returnNumber varchar(6)

    UPDATE

     dbo.mm_CompanyNo

    SET

     @returnNumber = last_cust_no = (CASE WHEN @strCompany = 'ABC' THEN '0' ELSE 'M' END) + RIGHT('00000'...

  • RE: How can one delete field contents using T-SQL?

    I agree use NULL and not a fixed value. You can work with it in your app just the same. However, what determines the validity of the data as this...

  • RE: transactional replication of many databases on a single sql instance

    Sorry I may be confused. However you are saying you need to replicate 200 dbs down to a single db on your reporting server right?

    You can setup a single distributor...

  • RE: Restoring a corrupted database?

    Most likely not but check to see mdf becomes available during the recovery. If so copy it to another location (might not let you since may be locked). However if you...

  • RE: Is there a memory size limit in SQL Agent?

    It is only limited by available memory on the server. From your message it looks like you have a character string which when it tries to copy the value in...

  • RE: Restoring a corrupted database?

    Do you have the original mdf file at all not the one in the backup? And do you keep multiple backups?

  • RE: Compare two tables using t-sql.

    Which version of SQL and what are the tables definition but you can always use option for SQL 7.

  • RE: Backup problem

    OK that would make sense. With replication you will either need to kick off and complete before you can do this or setup a job to do the work shortly...

  • RE: OPEN ROWSET Issues

    When they are copied do they get changed to the same name? If so the filesystem could have had the file locked. Have had this happen before using excel this...

  • RE: Backup problem

    I would start with the log file first and do

    BACKUP LOG dbName

    WITH TRUNCATE_ONLY

    then shrink just the log file first, could be the log file is filling when you try to...

  • RE: getdate()

    This does work but you shoudl for the sake of reference do this

    select dateadd(dd, datediff(dd, 0, getdate()), 0)

     

    Doing this will show you why

    select dateadd(yyyy, 0, datediff(yyyy, 0, getdate()))

    versus

    select dateadd(yyyy, datediff(yyyy,...

  • RE: Double Inner Join - slow query

    May or may not make any difference but nesting joins for related objects can sometimes improve performance. But it might be an idexing or other issue. I would look at...

  • RE: SELECT query question

    This is a little longer but overall the performance should be better than David's the larger the dataset is you are working with.

    The reason is that in Davids example...

  • RE: Compare two tables using t-sql.

    If these are on the same server

    For SQL 2000 you don't have those options but this can help

    SELECT

     A.KeyColumn,

     B.KeyColumn

    FROM

     (select KeyColumn, CHECKSUM(*) CheckMe from dbName1.dbo.Table1) A

    FULL JOIN

     (select KeyColumn, CHECKSUM(*) CheckMe from dbName2.dbo.Table2)...

  • RE: I/0 error Torn page

    Are you saying before you reinstalled you were at SP4? If so you need to actually restore the SQL Server and patch to SP4 first then resotre Master and your...

Viewing 15 posts - 661 through 675 (of 7,429 total)