I have a column which is called
studentID, but I have millions of records and somehow the application has input some arbitrary text in the column.
How do I search:
SELECT * FROM STUDENTS WHERE STUDENTID CONTAINS TEXT
This question is tagged with
~ Asked on 2013-06-26 14:00:59
Leaving database modeling issues aside. I think you can try
SELECT * FROM STUDENTS WHERE ISNUMERIC(STUDENTID) = 0
ISNUMERIC returns 1 for any value that seems numeric including things like
If you want to exclude digit-only studentids, try something like
SELECT * FROM STUDENTS WHERE STUDENTID LIKE '%[^0-9]%'
~ Answered on 2013-06-26 14:06:43
Just try below script:
Below code works only if studentid column datatype is varchar
SELECT * FROM STUDENTS WHERE STUDENTID like '%Searchstring%'
~ Answered on 2013-06-26 14:04:52