Results 1 to 2 of 2

Thread: query

  1. #1
    Join Date
    Aug 2010
    Posts
    21

    Unanswered: query

    hi . i have this table and i want to create a query for identify any instrument(s) that have not been returned past their rental due date

    create table InstStatus( InstStatus_ID integer not null primary key,
    InstStatus_available varchar(20),
    InstStatus_IssueDate Date,
    InstStatus_ExpDate Date,
    InstStatus_DurDate integer,
    Cust_ID integer,
    Inst_SN integer);

  2. #2
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963

    Lightbulb

    It could be something like following query:

    Code:
    select * from InstStatus
    Where InstStatus_ExpDate < current date
      and InstStatus_ExpDate < InstStatus_IssueDate + InstStatus_DurDate day
    ;
    Lenny
    Last edited by Lenny77; 08-30-10 at 17:07.

Posting Permissions

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