March 13, 2007 at 8:54 am
Hi, all!
I decided to search for help once more. Recently I started to work in a small publishing house, where my main job is DB administering with SQL Server 2000. I made new simple project using MSDE. Then I made table called Products, with those fields:
product_id
product_name
product_description
units_in office int, 4
units_at owner int, 4
units_on sale int, 4.
I hope you will understand that int is datatype and 4 is data lenth.
I want to make union query to sum those 3 last fields.
Can you give me an expression to do it?
I'll be very greatfull if anyone could help me out.
March 13, 2007 at 9:03 am
Does this solve your problem?
Select product_id, product_name, units_in office + units_at owner + units_on sale AS Total from dbo.Products
March 13, 2007 at 11:12 am
I'm sorry but no it does not!
I was hoping for better answer, because of course in T-SQL there isn't expression like +
Anyone else help me
March 13, 2007 at 11:24 am
Well yes there is, but probably not for what you need.
Can you take the time to post some sample data and the exact required output from that data. We'll get you going once we have that information.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply