Forum Replies Created

Viewing 15 posts - 3,901 through 3,915 (of 5,393 total)

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (9/13/2010)


    My apologies for this, but something occurred to me this morning and this was the only place I could think to tell people that would understand.

    I was thinking...

    -- Gianluca Sartori

  • RE: Condition addition of a trigger to a database?

    This should work:

    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TableName]') AND type in (N'U'))

    BEGIN

    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id =...

    -- Gianluca Sartori

  • RE: Optimization of an sql proc stock [Beginner]

    I suggest that you:

    1) Post your table scripts, as described in the article linked in my signature line

    2) Post your sample data in a more consumable format (INSERT INTO script)

    3)...

    -- Gianluca Sartori

  • RE: Condition addition of a trigger to a database?

    Lowell (9/10/2010)


    because of the error "A triggermust be the first command in a batch"

    you have to use dynamic SQL after the IF EXISTS test.

    that goes the same for procedure/ function/...

    -- Gianluca Sartori

  • RE: Condition addition of a trigger to a database?

    SeanLange (9/10/2010)


    Not sure why that wouldn't work.

    Because some statements have to be come first in a batch. Create trigger is one of them.

    -- Gianluca Sartori

  • RE: Condition addition of a trigger to a database?

    You could use dynamic sql:

    IF someCondition

    BEGIN

    EXEC('CREATE TRIGGER ....')

    END

    -- Gianluca Sartori

  • RE: size of table and database

    Try rebuilding your clustered index on the table, that should help.

    -- Gianluca Sartori

  • RE: Index

    DMVs could give you a starting point.

    Look up sy.dm_missing_index_* in BOL.

    Hope this helps

    Gianluca

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Lynn Pettis (9/8/2010)


    Still don't have access to a even a sandbox to start playing with Oracle.

    Install one. It's quite easy, even for a poor noob like me.

    I got Sun VirtualBox...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    GilaMonster (9/8/2010)


    Now here's an interesting question...

    Which is going to reach 20 000 posts first, me or the Thread?

    Don't know. What do bookmakers think? 😛

    -- Gianluca Sartori

  • RE: Create Linked Server to Informix DB

    I think you'd better start a new thread for this question.

    Unfortunately that's a very little information to work on, I don't think I can help you.

    -- Gianluca Sartori

  • RE: Inside the Optimizer: Constructing a Plan - Part 1

    Thank you, Paul. This is one of the topics I always wanted to investigate deeper, but never did.

    I look forward to reading the next parts.

    I will try to avoid...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (9/3/2010)


    Isn't it happy hour for you, Gianluca?

    Relax, ultimately you want to be professional, but it's a job. Give you opinion, document, go with the crowd if...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (9/3/2010)


    I'd implement the FK, document my issues, and pull it back out when he complained about performance.

    Well, our argument went a bit far from where it...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Yesterday I had a wild argument with my boss, claiming that a column named "description" could be perfectly suitable for a foreign key.

    I had to leave the office and go...

    -- Gianluca Sartori

Viewing 15 posts - 3,901 through 3,915 (of 5,393 total)