If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Other PC Databases > Command to replace item in a field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-10, 15:22
jacobk jacobk is offline
Registered User
 
Join Date: Apr 2010
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 04-13-10, 23:57
papsoft papsoft is offline
Registered User
 
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.
Reply With Quote
Reply

Tags
command, database, dbase

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On