SQL function to validate money input
SQL function to validate money input
От:
"Zhao, Scott" <scott.zhao@usask.ca>
Дата:
Hi All,
Is there a function available to validate if the input is a correct money format? For exapmle, "23.56" is a correct number but "23.567" is incorrect. I just like to do this in postgres level not in my application code.
Thanks
Scott
Re: SQL function to validate money input
От:
Richard Huxton <dev@archonet.com>
Дата:
On Wednesday 15 October 2003 22:46, Zhao, Scott wrote: > Hi All, > > Is there a function available to validate if the input is a correct > money format? For exapmle, "23.56" is a correct number but "23.567" is > incorrect. I just like to do this in postgres level not in my > application code. Well, you can always write your own, but: 1. How were you planning to use it? 2. What were you planning to do if the value provided isn't valid as money? -- Richard Huxton Archonet Ltd