title: How do I set precision & scale when using CAST in Oracle?
body: <p>Currently I have CAST($Variable AS varchar2(30)). </p>
  
  <p>I would like to add minimum and maximum precision. For example, the integers to the left of the decimal point in 1234567.89 should have a minimum of 1 but a maximum of five (so the extra integers would be trimmed). In addition, I'd like to do the same for scale - the decimals to the right, by setting a minimum of two decimal places and a maximum of four. These numbers are just examples, the numbers will be updated dynamically.</p>
  
  <p>From what I've read I would have to set precision and scale somehow within type_name in CAST, but I'm not certain how to do that with multiple minimum and maximum of each. I'm an Oracle noob, so I'd appreciate any help!</p>