Try select substr(orderno, 1,2) from shipment;
Just use SUBSTR function. It takes 3 parameters: String column name, starting index and length of substring:
select SUBSTR(OrderNo, 1, 2) FROM shipment;
take a look here
SELECT SUBSTR('Take the first four characters', 1, 4) FIRST_FOUR FROM DUAL;
select substr(orderno,1,2) from shipment;
You may want to have a look at the documentation too.
Easy:
SELECT SUBSTR(OrderNo, 1, 2) FROM shipment;
Source: Stackoverflow.com