SELECT extractnumeric.txt
,InStr(1,[txt],"-")-1 AS CheckDash
,IIf([CheckDash]>-1,Left([txt],[CheckDash]),IIf(IsNumeric([txt]),[txt],Null)) AS Поле1
,IIf([CheckDash]>-1,Right([txt],[CheckDash]),IIf(IsNumeric([txt]),[txt],Null)) AS Поле2
FROM extractnumeric;
|