Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)

  • RE: Suggestion on Foreign Key Constraint

    Ninja's_RGR'us (2/8/2011)


    Yes you're right on the script part.

    Like I said I NEVER leave the keys out of the dev phase.

    And then I'm good enough at tuning that I don't need...

  • RE: Suggestion on Foreign Key Constraint

    hi

    I think probably you mean the sequence in which the script will be executed .

    and hence you are concerned about

    ALTER TABLE [dbo].[UserInfo] WITH CHECK ADD CONSTRAINT [FK_UserInfo_Country]...

  • RE: Suggestion on Foreign Key Constraint

    Ninja's_RGR'us (2/8/2011)


    Nothing wrong with that. I guess you simply forgot the index on Countryid in the usersinfo table.

    Also, the script in that sequense qill not work, so maybe we...

  • RE: Suggestion on Foreign Key Constraint

    pavan_srirangam (2/8/2011)


    In first, I don't think you can reference country id in userinfo table as foriegn key as it is not a composite key or unique key or not not...

  • RE: Suggestion on Foreign Key Constraint

    Ninja's_RGR'us (2/8/2011)


    And just to point out something else. You will be able to delete, but not TRUNCATE. The fk removes the ability to truncate, but that's all.

    Yeah ,...

  • RE: Suggestion on Foreign Key Constraint

    Thanks,

    but Logically speaking , Dont you think its wrong that it will not allow me to delete a record in UserInfo Table

    Country Table is Master Table, I am not going...

  • RE: Suggestion on Foreign Key Constraint

    Thanks for your quick reply

    I quote you

    "2 Improves db speed" and this is my primary motivation., but i wonder architecturally if its a good practice.

    Limitation here i see is...

  • RE: Help Needed for Update Query

    lol 🙂 super Genius man.

  • RE: Help Needed for Update Query

    andrewd.smith (3/3/2009)


    UPDATE C

    SET C.rank = M.reputationvalue

    FROM TblComputedData C INNER JOIN TblFeedbackData F

    ON c.userId = F.UserId

    INNER JOIN TblMasterData m

    ON F.Score BETWEEN m.MinimumValue and M.MaximumValue

    WHERE isProcessed =1

    There's a potential...

  • RE: Help Needed for Update Query

    Thanks Mangal, nice response, Just checking your blog now.

Viewing 10 posts - 1 through 10 (of 10 total)