Re: Numeric validation. Help !
Posted in 1999
Topics: Third-Party Tools & Monitoring
From: "Art S. Kagel" <kagel@bloomberg.net> > >Umm. Alter the column to float or money or integer or decimal..... Now if *I* said something like that, I be told what a beast I was... :-) >thain@writeme.com wrote: > > > > Anyone know if there is any SQL function or a better way > > to validate that a 7-character defined field > > if having only numbers (0-9). Since we have a char > > column used as a charged ammount in a table. Here is my current SQL >query: > > "select sum(case when amount[1,7] not matches >'[0-9][0-9][0-9][0-9][0-9][0-9][0-9]' then '0' else amount end +0) from >mytable" ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
Obnoxio The Clown wrote: > > From: "Art S. Kagel" <kagel@bloomberg.net> > > > >Umm. Alter the column to float or money or integer or decimal..... > > Now if *I* said something like that, I be told what a beast I was... :-) It's all in how you present it, Obnoxio. It also helps to know your audience. ;-) Art S. Kagel > >thain@writeme.com wrote: > > > > > > Anyone know if there is any SQL function or a better way > > > to validate that a 7-character defined field > > > if having only numbers (0-9). Since we have a char > > > column used as a charged ammount in a table. Here is my current SQL > >query: > > > "select sum(case when amount[1,7] not matches > >'[0-9][0-9][0-9][0-9][0-9][0-9][0-9]' then '0' else amount end +0) from > >mytable" > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com