>Anyone have an idea on how i can create a column check constraint on a char(15) column that only allows the digits 0-9 and the characters A-F?
>
>In fox pro I did this...
>
>
>FOR i=1 TO LEN(ALLT(THISFORM.txtnic.VALUE))
> IF !INLIST(SUBSTR(ALLT(THISFORM.txtnic.VALUE),i,1), '1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F')
> warningmessage=warningmessage+CHR(13)+'Invalid NIC address. (Non hex digit)'+' "'+SUBSTR(ALLT(THISFORM.txtnic.VALUE),i,1)+'"'
> THISFORM.txtnic.SETFOCUS
> oktosave=.F.
> ENDIF
>ENDFOR
>
>
>but im not sure if you can loop through each character. Any help is appreciated.
>
>Eric Stephani
Well, for anyone who cares, I figured it out... here is the solution i got. I dug up some examples in the BOL and figured it out.
([physical] like '[0-9 A-F][0-9 A-F][0-9 A-F][0-9 A-F][[0-9 A-F][0-9 A-F][0-9 A-F][0-9 A-F][0-9 A-F][0-9 A-F][0-9 A-F][0-9 A-F]')