Forum Replies Created

Viewing 15 posts - 1,741 through 1,755 (of 2,038 total)

  • RE: Execute a table of statements

    RBarryYoung (3/25/2009)


    I do these kind of scripts (a lot) and I always concatenate them all together using either the Variable method or the XML method.

    The Variable method is more efficient...

  • RE: Execute a table of statements

    Hi Jeffrey

    Thanks for your reply!

    You are all absolutely right for these administrative task!

    I think I've just been nerved for this "security" introduction. Since now all my team members worked with...

  • RE: use top in a loop question

    You're always welcome!

    ... sorry for the little joke. 😉

    Greets

    Flo

  • RE: use top in a loop question

    Hi sqlblue

    I just added comments to my sample script. Now you should see the place for the UPDATE statement:

    DECLARE @big TABLE (id INT IDENTITY, value1 INT, to_update VARCHAR(100))

    -- "Many" sample...

  • RE: Trigger after Insert - Multiple tables

    Lowell, do you know how to recognize if there is any problem while sending the mail?

    Since now I also use the job-based solution. I just had a look to BOL...

  • RE: Group By Clause ???

    Hi Noel

    So I thought the OPENQUERY might be a better solution. I don't really know if the data are too much before or even after the grouping. Maybe Mike has...

  • RE: Execute a table of statements

    Hi Noel

    If I rethink my question I think my thought makes no sense, because it is a circle:

    * If I concatenate to many statements I run into the problem that...

  • RE: use top in a loop question

    Hi

    It is advisable to handle really huge updates in batches. The TOP function helps you to handle this. Here a little sample:

    DECLARE @big TABLE (id INT IDENTITY, value1 INT, to_update...

  • RE: Execute a table of statements

    Hi Dlongnecker

    This is an alike solution as my second one to concatenate all statements. But the XML way is definitely cooler! 😀

    I'm just not sure if this may become a...

  • RE: Execute a table of statements

    Hi Richard

    Thank your for your feedback. The sp_MSforeachdb also uses a CURSOR internally. See:

    DECLARE @v-2 NVARCHAR(MAX)

    SELECT @v-2 = definition

    FROM sys.all_sql_modules

    WHERE object_id =...

  • RE: Remove same records

    Hi Sander

    Try this:

    SET NOCOUNT ON

    DECLARE @History TABLE (

    ID int identity(1,1)

    , IDStatus int

    , IDItem int

    , DateCreated datetime)

    INSERT INTO @History (IDStatus, IDItem, DateCreated)

    ...

  • RE: Trigger after Insert - Multiple tables

    Lowell (3/25/2009)


    Florian i recently found out that the procedure sp_send_dbmail is asychronous, so it does not wait for the preocdure to execute before returning control tot eh calling procedure;

    in 2000,...

  • RE: Column and constraint Lookup

    Oups... sorry! I just tried on my SQL Server 2008.

    Just researched... so this should work on SQL Server 2005:

    SELECT OBJECT_NAME(object_id) referencing,

    OBJECT_NAME(referenced_major_id),

    ...

  • RE: Trigger after Insert - Multiple tables

    To avoid this you may add a "IsComplete" and a "IsSend" column to your Order table and use an UPDATE trigger. Then:

    * Insert the order

    * Insert the order details

    * Update...

  • RE: Group By Clause ???

    Hi

    Mike Levan (3/25/2009)


    The OLE DB provider "SQLNCLI" for linked server "OBEAVER" reported an error. Execution terminated by the provider because a resource limit was reached.

    Sounds like a resource problem. Maybe...

Viewing 15 posts - 1,741 through 1,755 (of 2,038 total)