?
Solved

Stored Proc Error with Isnumeric

Posted on 2004-09-30
2
Medium Priority
?
262 Views
Last Modified: 2008-02-01
IF (    (NOT ISNUMERIC(LEFT(@newExceptionLbl, 1))) AND (NOT ISNUMERIC(RIGHT(@newExceptionLbl, 1)))      )

I get this error:
Server: Msg 170, Level 15, State 1, Procedure test_put, Line 100 Line 100: Incorrect syntax near ')'.

Anything wrong with this statement?
0
Comment
Question by:phunchak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 32

Expert Comment

by:Brendt Hess
ID: 12192555
IsNumeric returns 1 or 0.  Try this, instead of using NOT:

 IF (ISNUMERIC(LEFT(@newExceptionLbl, 1))=0)
     AND (ISNUMERIC(RIGHT(@newExceptionLbl, 1))=0)
0
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 1000 total points
ID: 12192646
The NOT syntax you are using is from languages like VB, where NOT TRUE = FALSE, and only works on Boolean operations.  IsNumeric does not return a Boolean, but an INT.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question