Parsing problem

B

Bre-x

hi,

I have this query that I am using to parse this data 12345-1 into 12356 and
1

SELECT INVS, Right$([INVS],Len([INVS])-InStr(1,[INVS],'-')-1) AS WOSUF,
Left$([INVS],InStr(1,[INVS],"-")-1) AS WOPRE
FROM Temp;

I get the 12345 but not the "1"

There is something wrong with the formula, but I cannot figure it out.

Regards,

Bre-x
 
K

KARL DEWEY

SELECT Temp.INVS, Right$([INVS],Len([INVS])-InStr([INVS],"-")) AS WOSUF,
Left$([INVS],InStr(1,[INVS],"-")-1) AS WOPRE
FROM Temp;
 
Top