Forum Replies Created

Viewing 15 posts - 376 through 390 (of 497 total)

  • RE: how can i do this -EXEC IN

    How about using a temp/variable table to hold the values you want in your IN clause and doing away with the sp_executesql completely?

    
    
    DECLARE @foo table(mhlka_id int)
    insert...
  • RE: HELP NEED FIX MY CODE

    Kind of hard to debug this without the table structure but I think what you need to do is change the

    SET @mhkxa = 'WHERE mhlkot.mhlka_id IN ('+ @mhkx +')'

    to...

  • RE: design help please

    Another option in a slightly different approach is that you could easily put your objects in different tables as was suggested above. But when you want to return the results...

  • RE: What cursor would you use?

    Personally I always use stored procedures to do inserts, updates, and deletes. You have a lot more control over how the data is modified and can check for errors before...

  • RE: Snapshots

    I'm not familiar with your tool but if it is simply a full database backup you should be able to do a restore using the recovery flag and then restore...

  • RE: Scheduling of Tran Logs and Full Backups...

    Amy,

    As Bill stated transaction log backups apply to the last full backup. So if you do a full SQL Litespeed backup in the middle of the day the next log...

  • RE: internationalization issue -- using COLLATE

    Make sure you use the N before each string character. IE:

    SELECT * FROM tblBooksJapaneseInfo WHERE bookJPTiles like (N'%...%'‚'N'...' )

    BTW: It might be easier to just use the Latin1_General_Bin...

  • RE: trigger script

    I think what you really want is to query the "deleted" table rather than the actual table.

    IE:

    
    
    CREATE TRIGGER trgtblBag_data ON tblDelete_Inventory
    FOR DELETE
    AS

    DELETE t
    FROM tblBag_Data BD
    ...
  • RE: Trigger - Can they be bypassed?

    If you are not replicating the table you can use:

    ALTER TABLE foo DISABLE TRIGGER trg_foo

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer

  • RE: Script To Drop All Indexes And Keys In a Database

    The following 2 queries will allow you to create a script to drop the constraints and indexes. I don't have one handy for actually creating a script to re-create them....

  • RE: stored procedure type conversion error

    Try

    create procedure sample_proc(@session_id int)

    as

    begin

    declare @sql_stmt varchar(4000)

    set @sql_stmt =

    'select * from session ' +char(13)+

    'where session_id =' + CONVERT(varchar,@session_id )

    exec(@sql_stmt)

    end

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer

  • RE: Identity Column

    Easiest way would be to simply restore a backup of your database on the new server. Otherwise both Allen and Steve are correct.

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer

  • RE: Mass editing stored Procedures

    I wrote a script a while back that would read the syscomments table and look for a specific piece of text for a given type of object. It would then...

  • RE: Help the Novice

    As Bill stated it designates unicode. What it really means is that if your where clause to to contain ansi characters that can only be represented as 2 byte characters...

  • RE: join help

    Also note that in my query I didn't use an outer join as it looks to me like you only want to update the records in Master that are pertinent...

Viewing 15 posts - 376 through 390 (of 497 total)