sql server - How to check numeric value in sql? -


This is my code. I want only numeric characters if it is other than numeric, then do not print.

Here is the substring of one of the MMSG strings, which is dynamically created. So I can not change the type of 'MMS int', '3' or '4', ' Etc. MGGM includes commas, so I want to check for numeric. Consider a comma as numerical () numeric. I give 1 as the result. How can it be managed?

  Declare @ MSG varchar (5) Set @ mgg = ', 5' if (numerical (mmsg) = 1) print 'numeric' - logic and    

The messengers are definitely specifications they are discussing well in the community See for some discussions here.

What you really need to do is not quite clear between the questions and the comments, but you can get it as simple as checking in order to ensure that there are no commas Is:

  DECLARE @msg VARCHAR (5) SET @msg = ', 5' IF nanameric (mmsg) = 1 and four indices (',', @ msg, 1) = 0 print 'Numeric' - argument END   

How to do a better IsNumeric, see similar questions for more ideas on this Not.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -