Forum Replies Created

Viewing 15 posts - 811 through 825 (of 907 total)

  • RE: Rename database name

    Just take a database backup of the database you wish to rename, and restore it to the database name you want. I do this all the time in 7.0,...

  • RE: Triggers: Insert or Update?

    Here is a total hack on an undocumented field. I've done very little testing, but it seems to work for identifying enabled triggers for this example. Maybe it...

  • RE: String Function INSTR

    I think you have the charindex function backwards. It should read "charindex(',',field). Here is a stupid example that might help.

    declare @str varchar(100)

    set @str = 'Question: Where is the,...

  • RE: Moving tables to another FileGroup

    Drop your clustered index, and then re-build it on a new filegroup. If you don't have a clustered index, then create one on the new filegroup. When you...

  • RE: Triggers: Insert or Update?

    You might try writing two triggers, but having the common code in a stored procedure.

    This way each trigger can call the stored procedure and pass whether it is an insert...

  • RE: Data Type Question

    Here is some code that I think might work for you. It orders the data based on the first integer contained in the productsize char field, regardless of where...

  • RE: database backup

    Send a T-SQL string similar to this one to your server:

    Backup [your database] to disk='c:/mssql/backups/your database.bak'

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Moving file structure of SQL

    Normally when I move the system databases I used the procedures on the following page:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224071

    I never try to update the registry, but I'm sure that is also a do-able option.

    Gregory...

  • RE: Database Sizing Question

    File growth is something you need to track over time. You might try to build a tracking method using the output of any one or more of the following:

    sp_helpdb,...

  • RE: Separate one column to multiple columns

    Here is a very ugly TSQL SELECT command, that only works on your example. This example breaks apart you original string based on commas using CHARINDEX, SUBSTRING and LEN...

  • RE: Nightly Failed Jobs Report

    Dave's explaination is exactly the reason why I used a global temp table.

    Dave I think you are right on regarding a different connection. I think this is...

  • RE: Purging tables

    I'll agree with the self join slowing down the process.

    Another option to make sure the new batch does in fact only delete 1000 records would be to set your...

  • RE: Replace double+ blank by single blank

    ---You might consider this two step approach

    create table blank(

    field_blank char(100))

    insert into blank values('yyy yyyy')

    insert into blank values('xxxx xxxx')

    insert into blank values ('xxx xxx')

    insert into blank values ('zzzzzz...

  • RE: Purging tables

    I'm guessing since you are executing your delete command with exec (@Qstr) that possible this starts a new batch and your "SET ROWCOUNT 1000" is not controlling this new batch,...

  • RE: Scheduled job failed

    What version are you running on you Server?

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

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

Viewing 15 posts - 811 through 825 (of 907 total)