Forum Replies Created

Viewing 15 posts - 91 through 105 (of 284 total)

  • RE: Calculate the time based on States in a single table

    Here's a simple solution that works on SS-2000. If this represents a large table, make sure the TIME column is indexed descending. Pull out the derived table and look at...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Best Practice for Multiple Foreign Keys to Same Table

    There is nothing wrong with what you are trying to do. It is done all the time, say a table has a SentBy and a SentTo column both referring to...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Julian Timestamp

    The main purpose of the Julian date (in the old days of IT) was to put the date in an easily sortable form. This was before date and datetime datatypes....

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Group By Price Ranges

    I wholeheartedly agree with using a table to hold the cutoff values. The slight performance hit is well worth the flexibility of the design. However, there are two flaws in...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Get date of last Sunday of every month

    Here's my version, in the form of a couple of functions. The first, LastSunday, returns the date of the last Sunday of the month passed in.

    create function dbo.LastSunday(

    ...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Database development with centralized stored procedures and multiple "data" databases

    noeld (6/3/2008)


    The problem with merging is that some maintainability/availability requirements could be different forcing you to adapt to the "highest"...

    Agreed. In my situation, all of our databases are back-ends...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Index Creation

    First of all, you should recognize that you have, not a one-to-many, but a many-to-many relationship between Vendors and Services, resolved through the intersection table VendorServiceLink. You also have created...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Database development with centralized stored procedures and multiple "data" databases

    Michael Earl (6/2/2008)


    If this is a total re-design, why wouldn't you just create a single database ...

    This solution gets my vote. If you have the same code then you must...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: How to write Insert Trigger

    Based on the info you have provided, you don't need an INSERT trigger. Your client has a poorly designed table but it is a static table -- the data, once...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Composite Key Question

    Your code won't work on SQL Server 2000 ...

    Yes, I missed that. When teach posted his answer, I had no sooner framed the question, "Now why did he do it...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Composite Key Question

    What you have described is a M:M intersection table between Subjects and Tests with the addition of the date and result of each test. The restriction that each subject is...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: To get next working date for the given date...

    Matt Miller (5/29/2008)


    Must....resist...getting...sucked...into...religious...war...debate.

    What, and miss all the fun? 😉

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: To get next working date for the given date...

    Sarcasm forgiven... I know you just can't help it 😉

    Yeah. I have to attend a Sarcasm Management class as part of the terms of my release.

    I absolutely agree that...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: To get next working date for the given date...

    Numeric primary key...

    Yes, thank you, but I've known about Identity fields for, gee, several months now.

    Holiday date can appear more than once depending on things like Country or State.

    Oh,...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: To get next working date for the given date...

    Chirag (5/26/2008)


    A simple holiday table would have the following self-exlpanatory columns.

    HolidayID - Identity column

    HolidayDate - Datetime

    Description.

    An identity column? Why? What purpose does it serve? Under what circumstances would you ever...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

Viewing 15 posts - 91 through 105 (of 284 total)