|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hey I have a field, lets call it EECount that has both characters and integers in it. Is there a way to strip them out before casting, the characters are from a few offending users.
Maybe a where not varchar clause? Much appreciated. |
|
#2
|
|||
|
|||
|
Ok, so say you have this in the field...
bdy4483l ...do you want to return that record, and just strip out the letters, or do you not want to return that record @ all b/c it has chars in it? |
|
#3
|
|||
|
|||
|
RE: Strip out Non Integers query
I do not want to return that record at all because it has charachters in it. I do not want to include it when I cast it, if its bad data, I do not include the record at all.
RAT, Thanks |
|
#4
|
||||
|
||||
|
... WHERE EECount NOT LIKE '%[^0-9]%'
note: IsNumeric(EECount) is also worth considering, assuming you can live with the occasional dollar sign or period |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Strip out Non Integers query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|