You can use DataMajor to update Premvet.
You may have used the Tidy-Up options and noticed miss-spellings on some breeds, you may have both Rabbits and Lagomorphs listed as species. This option allows you to make changes back into Premvet to correct the data. Any changes made this way will:
There are some sample scripts in Stored Reports on the 'Update' Sub-Menu, if those do not handle it then just write your own using one of the examples. As this does Update both Premvet and DataMajor it is protected via an Access Permission - Only staff with access to '130' will be allowed into this sub-menu.
Once the script has run, you will get the question.
Do you still want to update the records? Yes No
The script is created as per any of the standard scripts on the system, as you are only dealing with the Animal Table they are usually a lot simpler.
To enable the update option you need to:
Depending on what you want the script to do, (you cannot apply multiple updates in the one script).
Lets look at one of the sample scripts, this will look for any rodents
in the breed field and update the Species to 'Rodent'.
The important
lines are in Bold.
## Scan all the Breeds for any Rodents and update Species
##
## WARNING THIS OPTION WILL UPDATE THE DATABASE
# SET UPDATE SPECIES
SELECT
pvid as "Record",
species as "Existing", breed as "Breed",
"Rodent" as "Change To"
FROM animal
WHERE breed in ("Rat","Ferret","Hamster","Mouse","Gerbil","Guinea Pig")
AND species not in ("Canine","Feline","Rodent") ;
If these basics are followed it will work.
There are a couple of things to keep in mind.
The current supplied reports are:
The upsec, upspec1 and upbreed scripts will use Regular Expressions for the match as will any future scripts if the contain 'Regex' on the information screen - all this means is some characters have a special meaning. These are:
| ^ | The beginning of the string |
|---|---|
| $ | The end of the string |
| . | Any character |
| [...] | Any character between the []'s |
| x|y|z | Either x or y or z |
| ^Pig | This will match text starting with pig e.g. not Guinea Pig |
|---|---|
| ^Pig$ | This will match exactly pig |
| dsh$ | This will entries ending with dsh, will not match with Staffordshire. |
| Budgie|Goose | This will match if it contains either Budgie or Goose |
You will have problems when you try to match some punctuation characters e.g. ?, there are ways around this, that is use [[:punct:]] but as you can see it is a little cryptic. We will not be documenting any of the advanced Regular Expressions here, if you need help contact support. [Back to Data Major Manual]