I am wanting to parse a string within SQL, However, I am not sure how to go about doing so.
Here is my code:
SELECT distinct sku, A_CLUSTER_DESC
FROM TOOL_SAS_DATA
WHERE sku in (1099895,
1099896,
1000960,
1000960,
1000898
);
My output is:
|| sku || A_Cluster_desc ||
1 ||1099895|| 'GG SAS AP_1234 A'||
2 ||1099896|| 'GG SAS AP_1113 B'||
etc.
I am wanting to just output under A_Cluster_desc
for it to say AP_1234 or AP_1113 and just excluding everything else around it.
EDIT:
Sorry if it wasn't more clear, I am wanting to just output AP_1234 or AP_####
regexp_substr()and regular expression