Forum Replies Created

Viewing 15 posts - 6,781 through 6,795 (of 7,608 total)

  • RE: Triggers advice / help

    Nope, you're not quite there yet, one other changed to make.

    You should always specify the owner (schema name) on objects in a trigger. There are very few always/never rules...

  • RE: Naming Convention for UDF's, Views and SP's

    Jeff Moden (2/13/2013)


    ScottPletcher (2/13/2013)


    I wouldn't use a separate schema, first of all because of the security considerations: you'll break the ownership chain, thus forcing a lot more security checks on...

  • RE: User Defined Table type

    JKSQL (2/13/2013)


    I just can't seem to find an article in how User Defined table types are stored. Do these go into the TempDb? Also is there an advantage...

  • RE: Naming Convention for UDF's, Views and SP's

    Just imagine if SQL itself tried to use all these prefixes? That would be a royal pain!

    In general they use the prefix to logically group things, such as sys.dm_db_*,...

  • RE: Naming Convention for UDF's, Views and SP's

    RonKyle (2/13/2013)


    Also, it's extremely inconsistent unless you also name all your tables tblXXX (and DO NOT, EVER, do that, ).

    Why would you never do this? I've seen dimension tables...

  • RE: Naming Convention for UDF's, Views and SP's

    Grant Fritchey (2/13/2013)


    Ever is probably an over-reaction, but in general these types of naming conventions just don't make sense. How is tblInvoices easier to understand than Invoices? How is it...

  • RE: Help With Foreign Keys

    nsmith 8448 (2/13/2013)


    Thanks everyone. Great input. No school project, just thrown into the fire without much experience in creating databases. Also, not using "tbl" on the tables, just noted it...

  • RE: Help With Foreign Keys

    Employee_Contact: Clus_Key = ( Emp_Id, Location, Type[, Sequence] )

    ....Emp_Id FK

    ....Location FK --<<-- alpha or numeric code for contact location: Home|Work|etc..

    ....Type FK --<<-- alpha or numeric code for contact type: Phone|Email|etc..

    ....Sequence...

  • RE: Help With Foreign Keys

    Hmm, if you're going to go live with this, you need to do some further normalization and use less-prefixed names, as below.

    Employee (abbreviated "Emp" below): Clus_Key = ( Emp_Id )

    ....Emp_Id...

  • RE: Please help my carrer Path?

    I understand English may not be your first language, so I won't criticize any of those aspects of your post. I've tried learning a foreign language and know how...

  • RE: Does a CASE statement execute all cases?

    Remember, SQL has to build a single plan ahead to time to cover any value. It doesn't look at the value of the variable when building the plan.

    But at...

  • RE: int column gets value of 0 by default

    Maybe an empty value/string of '' is somehow getting passed to that column? An int of '' is set to 0.

  • RE: Last Sunday of a month in sql

    russell-154600 (2/13/2013)


    Any argument that dates before 1900 are unlikely can't really be taken seriously can it? Pure foolishness.

    Please put all of the US Presidential elections and their results into...

  • RE: Naming Convention for UDF's, Views and SP's

    Given that the q said "why should they not be prefixed", I think it's OK. It shouldn't be done because it does slow down name lookup for those objects,...

  • RE: I'll apologize in advance.....ALTER DATABASE

    ALTER DATABASE MODIFY FILE ( NAME=logifcalfilename, SIZE=newsize )

    No special considerations required.

    If you don't have IFI set on, it may take a while, depending on how much you increased the size.

Viewing 15 posts - 6,781 through 6,795 (of 7,608 total)