Jump to content

Archived

This topic is now archived and is closed to further replies.

AV1611

Doing math one the query line

Recommended Posts

in this query, I am trying to make an extra field named VALUE with the math as shown... but it is obviously not right, as it doesn't work...

Any suggestion on how to do it correctly?

[code]
SELECT
  Part_Stock."PRTNUM_06",
  Part_Stock."STK_06",
  Part_Stock."QTYOH_06",
  Part_Master."MATL_01",
  Part_Master."CSTCNV_01"
  [b]Part_Stock."QTYOH_06"*Part_Master."MATL_01"/Part_Master."CSTCNV_01" as VALUE[/b]
FROM
  "MAXDAT"."Part Stock" Part_Stock INNER JOIN "MAXDAT"."Part Master" Part_Master ON Part_Stock."PRTNUM_06" = Part_Master."PRTNUM_01"
WHERE
  Part_Stock."QTYOH_06" > 0.00
ORDER BY
  Part_Stock."STK_06" ASC
[/code]

Share this post


Link to post
Share on other sites
Have you tried to remove all the double quotes?

Also, I am not used to JOIN's, but it seems there's something wrong near the JOIN part.

Does MySQL throw an error?

Share this post


Link to post
Share on other sites
Quotes are needed (not writing this to mysql, using PervasiveSQL)
If I drop the math line, the query runs fine. the JOINS is not a problem...

[!--quoteo(post=378721:date=May 31 2006, 10:47 AM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ May 31 2006, 10:47 AM) [snapback]378721[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Have you tried to remove all the double quotes?

Also, I am not used to JOIN's, but it seems there's something wrong near the JOIN part.

Does MySQL throw an error?
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.