A colleague wants to migrate an oracle stored procedure to Sybase,
When I encountered a problem, I asked in the group:
Who knows the varchar type variable operation function in the Sybase stored procedure?
(I didn't understand what's wrong with him ),
Casually replied: it's similar to Oracle.
He said: No.
I said: Come and give me a description of your problem.
It turns out that there is a string like "XXX on yyy" in the stored procedure. Only on is determined and the YYY must be retrieved.
First, search for Sybase subs on Google
Find the substring introduction. substring requires the start position and length, so you need to calculate the start position of yyy,
To calculate the starting position of YYY, you must locate the on Coordinate and use methods such as indexof,
Search on Google:
Sybase indexof
Sybase charat
Sybase find
Sybase locate
No results found
So change:
Sybase string
So I found all the string operation methods, browsed them, and found that the patidx method should be appropriate,
Solve the problem.
He said: gogole is indeed better than Baidu.