vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > Okay, so I have been gooling all over trying to > figure this out. I'm sure it's easy enough to do, > but I can't seem to find it. > All I want to do is figure out the difference between > 2 fields. IE: > Field 1= 20 > Field 2 =10 > Difference between Field 1 & 2 is: 10 > Any ideas? Umm, basic math? SELECT ( field1 - field2 ) AS difference FROM MyTable You should add in some checking to ensure that field1 and field2 values are actually numbers but that's basically it... Thnx, Chris |