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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top