Sybase: computing values from search results |
|
Okay, so you can search through a table and find the data you need. Next, using some built in functions in Sybase, you can work with the data. For instance, you can calculate how much a client owes you for billable time.
At the end of each command press the space-bar or press enter before continuing the the next step.
select
select hours * wage
from
where
like
"
"
go
If there is a value that matches your search, you see the results from your search and
(1 row affected)
The number may be 2 or 3, or whatever if your search matches more than
one row.
For example, to calculate how much your client Yoyodyne owes you, and you have all the data in a table called billable with a column named hours representing the time you have worked for them, and a column called wages for the charge per hour, type
select hours * wage from billable where
client=Yoyodyne go
|
Maintained by John Shipman, john@nmt.edu;
original by Steve Anderson
Last updated: 1997/06/25 00:27:22 UT URL: http://www.nmt.edu/tcc/help/db/sybase/compute.html |
|