Catherine,
I'm not sure exactly what you are asking, but I will take a guess on
what you mean. If this doesn't answer your question, post a follow up with
your table structure(s) and what you are trying to acheive.
If you have a table like this:
create table orderstest (order_id int NOT NULL,
order_qty int,
shipped_qty int)
constraint pk_orderstest primary key (order_id))
you can sum the order_qty like this:
select sum(order_qty) as total_ordered
from orderstest
you can subtract fields like this:
select order_qty - shipped_qty as balance_due
from orderstest
you can divide like this:
select 100 * (shipped_qty / order_qty) as percent_shipped
from orderstest
If you are new to SQL Server 2000, a great way to get up to speed in
just a few hours is with our video series on SQL Server 2000 at
www.TechnicalVideos.net. Our videos give tips and tricks from experts in
the field, while they show you on the screen just how to do them.
If you've ever had the opportunity to learn directly from an expert then
you know that there is no better way to learn. And the whole series is just
US $19.99.
Best regards,
Chuck Conover
www.TechnicalVideos.net (remove the "_no_spam_" from my email address if you reply directly)
[quoted text, click to view] "Catherine" <clequieu@nuvell.com> wrote in message
news:a0edee50.0403260806.19e4f6f@posting.google.com...
> I am fairly new to SQL and in my Results Statement, I want to add and
> divide various fields of information but I am unsure exactly how the
> correct format should be for this function. Any help would be greatly
> appreciated.