[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5333
  • Last Modified:

Division in PL/SQL

I am unable to perform a simple division in PL/SQL.
I am new to PL/SQL and try the following operation and but my Stored Procedure seems to break at this point.

cRec.RC_FACTOR1 never contains zero.

vF1 := (cRec.RC_FACTOR2 - cRec.RC_FACTOR1) / cRec.RC_FACTOR1;

0
gkerster
Asked:
gkerster
1 Solution
 
gjutrasCommented:
are all of cF1 cRec.RC_FACTOR2 and cRec.RC_FACTOR1 of a floating point like number?
if they aren't
cast each one that isn't as
cast(vF1 as number)
and try putting the whole expression in a cast((expression) as number)
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now