Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    5

    Unanswered: SQL compare dates question

    Good morning, all!

    In the ever changing world of IT, I just got handed this MsSQL 7 database project. I know basic MsSQL, but I am stumped with this issue.

    I've got a table, we'll call it 'engineering'. In this table, I've got the following columns:

    STATUS
    R_DATE
    P_DATE
    TYPE

    What I am trying to do is generate a query that will look at these columns and give me the following data:

    By TYPE, where the P_DATE = R_DATE and where the R_DATE is greater than the P_DATE where the STATUS = CLSD and only show dates for 2003. All I need is a total, for example, the ideal output would be:

    TYPE MADE_DATE MISSED_DATE

    OPRE 13 19


    etc...

    Here is a sample of the output from each column name:

    STATUS= CLSD
    PDATE= 9/22/2000
    RDATE = 10/10/2000 2:06:00 PM (time can be ignored here)
    TYPE = OPRE


    As I mentioned, I am pretty new SQL and my classes for it don't start until next month. Any help any of you could render would be much appreciated.

    Thanks in advance.

    - Peter

  2. #2
    Join Date
    Sep 2003
    Posts
    5
    Please ignore...

    I posted this in the wrong forum.

    Sorry!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •