Reorganising field in a table

  • Well folks, I didn't expect this one to get as much attention as it did.

    I'm now thinking reorganising the columns is going to e bad idea (as far as the table goes).

    @jeff - This is a FACT table so all columns are completed (no NULLs) but that's a useful titbit I didn't know about (for the used/unused columns) and I'll keep in mind for future reference.  The views sound like a far better plan than my original (now hare-brained) idea.

    @Frederico - I've never come across that before, so possibly something to add to the arsenal as well.

     

    Thanks all

     

    Richard

  • On a slightly different (but possibly connected) note.  When I use Table Designer in SSMS, why do I appear to lose foreign key references?

    We've got some code that flags any that are missing and it always seems to bring up the table I've just edited (but only using Table Designer).

     

    Regards

     

    Richard

  • are you sure its the designer? I've never seen it to make that.

    but the script generation is another story - the defaults remove lots of things, and this is a MUST change in any install done.

  • I've only seen it when using the designer.

    Can you point in the direction of the specific (if there is one) default that needs changing to stop this happening?

    I've had a dig through the defaults but couldn't see anything obvious.

     

    TIA

     

    Richard

  • richardmgreen1 wrote:

    I've only seen it when using the designer.

    Can you point in the direction of the specific (if there is one) default that needs changing to stop this happening?

    I've had a dig through the defaults but couldn't see anything obvious.

    TIA

    Richard

    Take a look in

    Tools/Options/SQL Server Object Explorer/Scripting

    and you'll see that many things are set to False by default.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Thanks @Phil

    I've just looked and foreign keys are set to TRUE which is odd.

    I'll keep an eye on it and see if it happens again.

     

    I'll also go through the other options and see if anything else needs changing.

     

    Cheers

    Richard

  • richardmgreen1 wrote:

    Thanks @Phil

    I've just looked and foreign keys are set to TRUE which is odd.

    I'll keep an eye on it and see if it happens again.

    I'll also go through the other options and see if anything else needs changing.

    Cheers

    Richard

    Those are scripting options, not Designer options.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 7 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic. Login to reply