• CELKO (12/15/2010)


    5) Why did you use MONEY? Do you know about the math problems it has?

    There's math problems with money? Please, do tell. I haven't heard anything about them and as I use that field quite a bit, I need to know.

    CELKO (12/15/2010)


    6) ISNULL() is dialect; use COALESCE instead.

    Dialect??? Not sure what you mean by that. Please explain.

    CELKO (12/15/2010)


    7) Never put a "T-" prefix on a table name.

    This is a personal preference issue. Using "T-" as a naming standards is at best annoying to type, but shouldn't cause any problems unless it's a reserved keyword issue that I'm unaware of.

    CELKO (12/15/2010)


    12) Cash is not an entity; it is a type of asset. Why would it be in a separate table? Do you keep muktiple sets of books for purposes of fraud?

    Careful, Joe. That's not only insulting but it opens you up to libel and defamation suits. Is your online rep worth so much to your ego that you can afford to be in court for making comments like this?

    BIG EDIT BELOW:

    CELKO (12/15/2010)


    6) ISNULL() is dialect; use COALESCE instead.

    Wow. I just learned an interesting thing from Books Online. I do not think COALESCE in SQL Server means what you think it means, Joe.

    SQL Server Books Online


    ISNULL and COALESCE though equivalent, can behave differently. An expression involving ISNULL with non-null parameters is considered to be NOT NULL, while expressions involving COALESCE with non-null parameters is considered to be NULL.

    Now Microsoft may or may not have implemented COALESCE() by ANSI-Standards. I don't know. But given that no one can compare one unknown value (NULL) to another unknown value, I don't think using COALESCE() will help the OP. Especially since COALESCE returns NULL if all the expressions being evaluated are NULL.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.