Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
madhulatha_b
Starting Member
22 Posts |
Posted - 2006-02-28 : 00:44:08
|
| I need to write a stored procedure to check the input parameter passed to SP is a numeric or non numeric. How to check this. please help meI have tried in this way.. But it doesn't workcreate proc isNumeric( @param varchar(60)) isbegin declare @num decimal(20,10) set @num= convert(decimal, @param) if @@error = 0 return 1 else return 0end |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-28 : 01:03:13
|
Try this logicSelect data from( Select 'test' as data union all select '123.45' union all select '1002343.45' union all select '1e3.45' union all select '13.3345' ) Twhere data not like '%[a-zA-Z]%' Also read thishttp://aspfaq.com/show.asp?id=2390MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|