Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting a numeric value in a variable

Status
Not open for further replies.

GRHE

Programmer
Jun 19, 2001
29
0
0
GB
Hi

Long time and no stupid questions from me!

But in a procedure how would you detect a numeric value in a char(10) ie.

declare @sp char(10)

set @sp ='4' -- its numeric

set @sp = 'hello' -- it aint numeric

Many Thanks
 
Ok dont panic I have just found isnumeric(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top