SELECT substring ('(43.123,22.5546)',patindex ('%,%','(43.123,22.5546)')+1,patindex ('% [)]%','(43.123,22.5546)')-1); | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

SELECT substring ('(43.123,22.5546)',patindex ('%,%','(43.123,22.5546)')+1,patindex ('% [)]%','(43.123,22.5546)')-1);

what is the mistake , i try to excute it an d i am keep getting the result 22.5546) how can i remove the close aparentesis

30th Dec 2019, 12:56 AM
fire yeti
1 Answer
+ 1
Try to evaluate each `patindex` call result and see whether the values makes sense to be passed as argument to `substring` funcrion.
22nd Jan 2020, 11:31 AM
Ipang