amarender reddy jali

SQL

Got a SQL question? Any SQL flavor here, just ask. Indicate yo...
Jan 31, 2020 06:53
Hi I have a tool which won't take union operator and "or "operator in where condition .how to join two exclusive result sets
 
Oct 16, 2019 10:20
SEE THIS IS UR OLDER SOLUTION
Oct 16, 2019 10:20
SELECT REGEXP_REPLACE(REGEXP_REPLACE('HEADER|N1000|E1001|N1002|E100‌​3', '.*?E(\d+)', '\1,'), ',(\|.*)?$', '')
Oct 16, 2019 10:20
A REQUEST
Oct 16, 2019 10:20
I HAVE
Oct 16, 2019 10:20
PLZZ RESPOND
Oct 16, 2019 10:20
@NICK
Oct 16, 2019 10:20
NICK
Oct 16, 2019 07:00
are u there
Oct 16, 2019 07:00
@nick
Oct 16, 2019 03:58
@nick i have added other possible datasets in the question
Oct 16, 2019 03:39
sorry, this is my first question in stack exchange . so i didnt gave all the data properly. i should have specified that the solution should not be data set specific and it should take this kind of alternate data set scenerios . my bad . i am sorry for constantly bugging you
Oct 16, 2019 03:39
please please . i am unable to ask a new question for 1 more day . can u just look into it for 5 mins i think u can do it . it just that data sets of containing only N numbers or E numbers it is failing can u look into this.
Oct 16, 2019 03:39
i see that ur a australian ok time difference got it . thanks for replying at 10 :30 in night and let me clarify the whole scenerio <br/> 1) the data set doesn't have pipe at the end <br/> 2) dataset may have only e numbers or n numbers . *when it only has n numbers but i am searching for e numbers it is throwing error *. so thanks for helping upto this point . please help in solution
Oct 16, 2019 03:39
are u there nick .plzzz help me here . yesterday solution . the input correction it doesnt have '|' pipe symbol at last so . i thought removing pipe symbol in your query might work . it was working for this particular data set but when i input 'HEADER|N1000|E1001|N1002|E1003' it gives wrong answer
Oct 16, 2019 03:39
FOR different input it is failing like if only N numbers are there in the input SELECT REGEXP_REPLACE(REGEXP_REPLACE('HEADER|N1000|N1001|N1002|N100‌​3', '.*?E(\d+)', '\1,'), ',(\|.*)?$', '') FROM dual
Oct 16, 2019 03:39
Thank you so much. u removed trim . if possible and if u are free ! take ur time can u briefly say what first regexp_replace and inner regexp are doing. no hurries. thanks u so much . this was my first time in stack overflow and my first question i didnt expect some one to answer my question . thanks fo all ur time on this question
Oct 16, 2019 03:39
hi for the output of numbers beginning with E, SELECT TRIM(',' FROM TRIM('|' FROM REGEXP_REPLACE('HEADER|N1000|E1001|N1002|E1003|N1004|N1005|'‌​, '.*?E(\d+)', '\1,'))) FROM dual it is showing wrong output
Oct 16, 2019 03:39
thank u so much nick i really appreciate ur help. thanks can u also recommend me some study links so i can learn this stuff
Oct 16, 2019 03:39
sybase . i am running it in oracle sql developer
Oct 16, 2019 03:39
oracle database . . i am running it on oracle sql developer. thanks will check and tell
Oct 16, 2019 03:39
Meta Stack Overflow SELECT REGEXP_REPLACE('HEADER|N1000|E1001|N1002|E1003|N1004|N1005|'‌​, '.*?(\\d+)', '\\1,')) is not exactly replacing characters leading up to a number . it is just giving the same string as result
Oct 16, 2019 03:39
can u check the regexp expression it is just giving the same string as result
Oct 16, 2019 03:39
and thanks for answering . can u point out why it is showing error
Oct 16, 2019 03:39
error - it shows From keyword not found where expected