Results 1 to 3 of 3

Thread: List Date Not found in Database

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    2

    Question List Date Not found in Database

    Good Day!

    Can anyone tell whether it is possible to list the date not found in a database. For example my data entry is 1/01/03, 1/04/03, 1/07/03, 1/12/03, 1/13/03 and 1/15/03 and i want to know the dates between 1/03/03 to 1/20/03 not in the database. any kind of help is really appreciated. thanks in advance

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    What type of database? Where do you want the code to execute (application or database)? What format do you want your list (delimited string, array, recordset)?

    If SQL Server Stored Procedure and recordset

    Create a temp table with a date field
    Loop through each day in your date range
    Execute a query to see if the date exists.
    If No add day to temp table.
    After Loop ends Select * From Temp table

    Or

    Create a Temp table
    Add each day in your date range to the temp table
    Select data from your Temp table joined to your db table.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    2
    thanks for the advice, btw i'm using access and the result should be in a recordset format. again thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width