Asked by Maliki Hassani
at 2024-11-15 06:57:21
Point:500 Replies:5 POST_ID:828793USER_ID:11697
Topic:
Oracle Database;;SQL Query Syntax
Experts,
I have a field called "Request_ID", that contains two merged Request ID's in the form of "000000001098990|000000029558106". I would like to only show all values before the "|". So show only "000000001098990". Is there a way to do this?
this works but, is this the best way because what if the amount of values increase?
SUBSTR ((AU.request_id),0,(LENGTH(AU.request_id)-16)) AS REQUEST_ID_MOD,
Current ouput:
TKT-1412155 000000001098990|000000029558106
TKT-1412155 000000001098970|000000029558106
TKT-1412155 000000001098991|000000029558106
TKT-1412155 000000001098957|000000029558106
Needing ouput:
TKT-1412155 000000001098990
TKT-1412155 000000001098970
TKT-1412155 000000001098991
TKT-1412155 000000001098957
Thanks
I have a field called "Request_ID", that contains two merged Request ID's in the form of "000000001098990|000000029558106". I would like to only show all values before the "|". So show only "000000001098990". Is there a way to do this?
this works but, is this the best way because what if the amount of values increase?
SUBSTR ((AU.request_id),0,(LENGTH(AU.request_id)-16)) AS REQUEST_ID_MOD,
Current ouput:
TKT-1412155 000000001098990|000000029558106
TKT-1412155 000000001098970|000000029558106
TKT-1412155 000000001098991|000000029558106
TKT-1412155 000000001098957|000000029558106
Needing ouput:
TKT-1412155 000000001098990
TKT-1412155 000000001098970
TKT-1412155 000000001098991
TKT-1412155 000000001098957
Thanks