If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Only numerical values...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-05, 08:22
steve_o steve_o is offline
Registered User
 
Join Date: Apr 2004
Posts: 43
Only numerical values...

Hallo,
Does anybody know how I can check for values in a field (type varchar) that consist of characters other than numbers (0, 1, 2, 3, 4, ...9) ?? For example, the query will return 12345-A, but not 12345.
Or is this only possible in a program?
Thanks in advance,
stephen.
Reply With Quote
  #2 (permalink)  
Old 11-03-05, 16:26
June C. Hunt June C. Hunt is offline
Registered User
 
Join Date: Feb 2005
Posts: 43
Taking a shot at this, try:

select * from my_table where field1 NOT MATCHES ("[0-9]*[0-9]*[0-9]");

Does that work for you?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On