SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 calculation in a query
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

joemama
Posting Yak Master

113 Posts

Posted - 05/16/2005 :  15:26:36  Show Profile
the query below i have that works fine...

but now i want to have

dbo.ProdOrderDetails.DetailQuantity * dbo.ProdOrderDetails.DetailProdPrice = a new column called ItemTotal

can someone tell me how to do it?




CREATE VIEW dbo.QryCartDetails
AS
SELECT dbo.ProdOrderDetails.DetailGUID, dbo.ProdOrderDetails.DetailQuantity, dbo.ProdOrderDetails.DetailOrderID, dbo.Products.ProdName,
dbo.Products.ProdShortDesc, dbo.Products.ProdLongDesc, dbo.Products.ProdID, dbo.ProdOrderDetails.DetailID, dbo.ProdScent.ProdScentLabel, dbo.ProdSize.ProdSizeLabel, dbo.ProdSize.ProdWeight, dbo.ProdOrderDetails.DetailProdPrice
FROM dbo.Products INNER JOIN
dbo.ProdOrderDetails ON dbo.Products.ProdID = dbo.ProdOrderDetails.DetailProdID LEFT OUTER JOIN
dbo.ProdSize ON dbo.ProdOrderDetails.DetailSize = dbo.ProdSize.ProdSizeID LEFT OUTER JOIN
dbo.ProdScent ON dbo.ProdOrderDetails.DetailScent = dbo.ProdScent.ProdScentID

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1769 Posts

Posted - 05/16/2005 :  15:36:59  Show Profile
dbo.ProdOrderDetails.DetailQuantity * dbo.ProdOrderDetails.DetailProdPrice as ItemTotal

HTH

=================================================================
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently. -Friedrich Nietzsche, philosopher (1844-1900)

Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000