Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Posts
    2

    Unanswered: Need help with old dbase III+ program

    Hi. The program below was written to update one database of fax numbers from another so that duplicates could be tagged. We recently discovered that if there are multiples of the same fax in the database being updated, only one of those records gets updated. We want all of them to be updated. I'm sure it is just missing a simple line or two, but I am not a programmer and can't seem to find the right command.

    select b
    use fax1
    index on fax to faxind1
    select a
    use fax2
    index on fax to faxind2
    update on fax from fax1 replace code with "*"

    Thanks in advance for any ideas.

  2. #2
    Join Date
    Nov 2004
    Posts
    39
    That is really what the UPDATE ON statement do.
    It only updates the first record that matched from your source.

    You must use SET RELATION to get your desired result.

    You have to change this line:
    index on fax to faxind2
    update on fax from fax1 replace code with "*"
    Into:

    SET RELATION TO fax INTO fax1
    REPLACE code WITH "*" FOR a.fax=b.fax
    Only the index on the fax1 is required.


    I hope this helps.

  3. #3
    Join Date
    Dec 2004
    Posts
    2

    Question Did not work

    Thanks for the reply. I tried the new code and it gave the following error:
    Variable not found. There was a question mark (?) over the a.fax code line.
    Any suggestions? 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
  •