Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Ignore Text in Column

Posted on 2007-08-01
3
Medium Priority
?
242 Views
Last Modified: 2012-05-05
Hi

I have the query below - How do i ignore any entries in the column where they are TEXT entries.

E.g in the column acc.account - it can have entries such as:
12345
test
345
qwe

I want the query to ignore any records which are not numeric. Any ideas?

Select  
--CAST (acc.Account AS INT),
acc.TITLE,
RIGHT(acc.ACCOUNT,5)
From
BM10MACELV.dbo.Projects proj LEFT JOIN SQSDBA.v_Account acc ON proj.[project nr] =  RIGHT(acc.ACCOUNT,5)
Where acc.Ledger = 'P_INTPROJECT'


Thanks again
0
Comment
Question by:patelajk
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 19610080
WHERE ISNUMERIC(urField) = 1
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 19610081
Where acc.Ledger = 'P_INTPROJECT'  AND ISNUMERIC(acc.Account) = 1
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 19610092
SELECT blah blah blah
FROM blah
WHERE ISNUMERIC(acc.ACCOUNT)
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
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…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

581 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