i need help to write an sql script to return values from different positions within the example string below:
i want values from positions 2-8 and concatenate with values in positions 11-13.
is there a way to return the values from both positions using sbstr function only or i have to concatenate for it to work?
the subtr function i used is able to get the values from positions 2-8 but i havent been able to concatenate with the values from positions 11-13.
Below is my working subtr function:
SELECT SUBSTR(FIELD, 2,8)
Hi Mani et al,
What I want to do now is to do a count over my resultset.
The distinct function below is working (but I want something to tell me the number of occurrence of the duplicates):
SELECT DISTINCT SUBSTR(field, 2,7)||SUBSTR(field, 11,3)
WHERE FIELD = 'XX'