Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2013
    Posts
    163

    Unanswered: Auto Update Columns based on Another Field

    Dear Seniors,

    I have a table as follows

    ID - Text (Primary key)
    START (10%) - Text
    IDC (30%) - Text
    IFR (60%) - Text
    IFA (80%) - Text
    IFD (100%) - Text
    Progress - Percentage

    Now the Progress is updated from another table. What I required is based on the progress the other field need to be updated with some text say "X"

    If my progress is 30%, then the START and IDC field to be updated with X. If it is 80%, then START, IDC, IFR & IFA to be updated with X like that...
    Thanks and Regards
    R. Vadivelan

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    What??
    If a record hits 30% then update it with X.
    If a record hits 80% then update it with X too?

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    One way that would work is to have a query for each category of completion eg
    Code:
    update mytable set start [enter text here] where progress > 0.1 and isnull(start)
    but check whether the value should be 0.1 or 10 BEFORE running the query

    if the text is always going to be the same ie all rows where progress > 0.1 then creat a table with tbe threshold and the description and JOIN to the data table. Having said that having 5 columns whise text value is determined by another numeric value smacks if crap design.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Oct 2013
    Posts
    163
    Hi Ranman,

    Quote Originally Posted by ranman256 View Post
    What??
    If a record hits 30% then update it with X.
    If a record hits 80% then update it with X too?
    If the record hits 30%, then START and IDC field to be updated with X
    If the Record hits 80% then START, IDC, IFR & IFA field to be updated with X
    Thanks and Regards
    R. Vadivelan

  5. #5
    Join Date
    Oct 2013
    Posts
    163
    Thanks Healdam,

    I will give a try and update you ASAP.
    Thanks and Regards
    R. Vadivelan

Posting Permissions

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