Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Producing a new date depending on a figure

Discussion in 'Information Technology' started by Paul T, Nov 18, 2005.

  1. Paul T

    Paul T
    Expand Collapse
    Guest

    I need to make a query which will update a second date field in a main table.
    for example The date an order was origanaly taken + 14 days if a customers
    fee is £50
    so date order taken is 11/11/05 the re call date would need to be 25/11/05

    ii the order is £100 re check date needs to be 31 days after origanal order
    date.

    Any ideas or suggestions would be greatly appreciated
     
  2. Loading...

    Similar Threads Forum Date
    India Punjab emerging as major drug producing centre Breaking News Mar 13, 2013
    Sikh News BREAKING: Young Sikh Shot Dead In Jalalabad, Afghanistan . - Sikh24 News & Updates Breaking News Oct 2, 2016
    Sikh News Sikh Candidate In Hamilton Disgusted By Racist Vandalism - Newstalk ZB Breaking News Aug 22, 2016
    Sikh News Amit Jani: Trump Leverages Fear In Americans, Wrong Candidate For Our Nation's Future Breaking News Feb 18, 2016
    update Blogs Oct 16, 2015

  3. David Lloyd

    David Lloyd
    Expand Collapse
    Guest

    Paul:

    The following UPDATE query is one alternative for accomplishing something
    like this:

    UPDATE MyTable
    SET MyTable.SecondDate =
    IIf([FeeField]=50,DateAdd("d",[OrderDate],14),IIf([FeeField]=100,DateAdd("d",[OrderDate],31),Date()));

    In this example, I defaulted the second date to the current date if the fee
    is not 50 or 100. You can adjust this to your needs. The above query will
    update all records. If you want to update only a subset of records, use an
    appropriate WHERE clause.

    --
    David Lloyd
    MCSD .NET
    http://LemingtonConsulting.com

    This response is supplied "as is" without any representations or warranties.


    "Paul T" <Paul T@discussions.microsoft.com> wrote in message
    news:C6B1DE20-304C-406E-83FA-5BF3294089A1@microsoft.com...
    I need to make a query which will update a second date field in a main
    table.
    for example The date an order was origanaly taken + 14 days if a customers
    fee is £50
    so date order taken is 11/11/05 the re call date would need to be 25/11/05

    ii the order is £100 re check date needs to be 31 days after origanal order
    date.

    Any ideas or suggestions would be greatly appreciated
     

Share This Page