how to grab everything before a 3rd occurrence of a character in sql query : how can i grab all the data before the 3rd '-'
below i have the sample data.

000700-      - - 8
015111-      - 005 -
019999-      - 005 -
A01- 01200-   0 - 5
A01-012000- - 5
A02-015450- - 5
A02-015450- 003 - 1
D08-020700- - 8
D08-020710- - 5
D08-020710- 013 - 1
D08-020710- 013 - 3