Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Unanswered: Command to replace item in a field

    Hi all.
    i have no experience in dbase but have a general idea how it works.
    I have a databse file with my store inventory.
    i need to replace numbers in "price" field.
    example . i have some items priced at 1.99 i need to replace it with 2.49 throughout the database. I also want to change department for some item.
    field name for department is "DEP"
    example. department xx should be replace with yy.
    Thanks

  2. #2
    Join Date
    Jan 2009
    Location
    Florence, SC
    Posts
    10
    its been a long time since I messed around with dbase...

    But here goes.... Plus make a copy of your dbase files BEFORE changing them in case you screw it up. You can start over.

    Open dbase...

    USE yourdatabase exclusive
    replace all price with 2.49 for price = 1.99
    close all

    USE yourdatabase exclusive
    replace all department with "XXX" for department = "DEP"
    close all

    Just make sure you are replacing fields with the same type of data... ie decimal fields = just numbers -- string fields must use quotes.

    Maybe someone else can chime in if my dbase memory has forsaken me.

Tags for this Thread

Posting Permissions

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