Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
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  

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
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

1834 Posts

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


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.09 seconds. Powered By: Snitz Forums 2000