ripperfuel
IS-IT--Management
Case 1:
select substring ('12345678', 3, 3);
gives 345 as result, which is fine.
Case 2:
select substring (12345678, 3, 3);
gives 12 as result, and
select substring(12345678 from 7 for 2);
gives 45 as result.
I realize I used number in case 2. Can you explain why I am getting '12' and '45' for those queries. Thanks.
select substring ('12345678', 3, 3);
gives 345 as result, which is fine.
Case 2:
select substring (12345678, 3, 3);
gives 12 as result, and
select substring(12345678 from 7 for 2);
gives 45 as result.
I realize I used number in case 2. Can you explain why I am getting '12' and '45' for those queries. Thanks.