Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error in calculation in SP 1

Status
Not open for further replies.

Hueby

MIS
Oct 20, 2004
321
0
0
US
I'm using this in my SP. But it throw a error "Invalid column name 'taxprice'." The taxprice works fine, but when I try to do the total is throws the error. I guess I can not do what I am trying to do?

Code:
ROUND(CAST((1+(.06))*(tbl_products.pprice)as Decimal (10,2)),2) as taxprice,
ROUND(CAST((1+(.02))*((taxprice)*(tbl_material_used.mqty))as Decimal (10,2)),2) as total
 
YOu have to repeat the whole formula there, it won;t accept the alias.

Questions about posting. See faq183-874
 
How would I do that, I'm not understanding?
 
ROUND(CAST((1+(.06))*(tbl_products.pprice)as Decimal (10,2)),2) as taxprice,
ROUND(CAST((1+(.02))*(((1+(.06))*(tbl_products.pprice))*(tbl_material_used.mqty))as Decimal (10,2)),2) as total

 
OHHHHHHHHHHHH!!! Duh.. I feel dumb now. Thank you soo much everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top