Zmud database manipulation

by Melanchthon

Back to Mechanic's Corner.

Melanchthon2006-07-14 07:59:53
I have database records for the stats of every forge I've ever done, but I've only recently started tracking overall weapon quality. Aside from manually calculating the quality of thousands of records, is there any way I can have zmud calculate the numeric total of fields A, B, and C, then put it in field D, for each database record?
Ildaudid2006-07-14 08:08:44
You mean as it total stats added up?

like 150/200/200
total stat 550?

something like that?
Melanchthon2006-07-14 08:21:46
Right. I have it working so it does that for every new record I add, but I need to update thousands of existing records with the new 4th field.

So, for all my n old records that currently look like 50 - 100 - 200 - 0, I'm looking for a way to script in filling out the last field to make it 50 - 100 - 200 - 350, for example.
Shryke2006-07-14 08:54:08
I would say try and put it in excel or something like that.
EDIT: Or you could copy the data, and paste it into Zmud after making a trigger like #trigger {(*) - (*) - (*)} {#math total (%1+%2+%3)} or whatever the syntaxes are...
Melanchthon2006-07-14 09:14:30
QUOTE(Shryke @ Jul 14 2006, 08:54 AM) 307660

I would say try and put it in excel or something like that.
EDIT: Or you could copy the data, and paste it into Zmud after making a trigger like #trigger {(*) - (*) - (*)} {#math total (%1+%2+%3)} or whatever the syntaxes are...

*nod* it's working fine for capturing new forges. I'm trying to add in a new, fourth field for every previously existing record in my database that is the sum total of the original first three fields. My problem is that I have literally thousands of old records that need to be updated like this, and I really don't want to do it manually if I can avoid it.

EDIT: This is a simple alias I wrote for doing this for two-hander weapons. I just have to hit it a few thousand times for each database, and I'm set! Hoping for an easier way, but maybe this is it =/

%1=@count
#math dbquality ((@%1.Damage/2)+(@%1.Precision/2.2)+@%1.Speed)
#dbput @count Quality @dbquality
#add count 1

I guess I could loop it, but it starts to do fuzzy math when I try for some reason...the numbers stop adding up correctly. Not sure why =/
Shryke2006-07-14 19:07:43
I would loop it with a small time lag in between each calculation so as not to crash your comp.. Like maybe .2 seconds and just run it over night or something.