how do i validate the extract function found a delimiter or not?

Certified Associate Developer

i'm testing a very  inconsistent  database from an integration   and i'm trying  to get a especific fields if it is there but  the thing is that the  end limiter could be different in too many ways   and this throws me an error that broke my program i tried to many times of not breaking  it  like using index() but  nothing helps  also i tried to   use another function to obtain the values like  the func wherecontains() as a starindex   whitin a mid() function but i didn't fiind the way  of making it work

  Discussion posts and replies are publicly visible

  • The very first thing you need to do is to profile your data. You need to know exactly what your data looks like - what it contains - in order to decide how best to extract what you're looking for. Using the extract() function may not be the best option for the data you have. Do you have the results of such a data profiling? And some more information about exactly what you're trying to extract from the data? Is it even possible that what you should be doing is ensuring the data is written to the database in a cleaner, better way than it is now (i.e. have you considered solving the problem upstream from where you current are looking?)

  • 0
    Certified Associate Developer
    in reply to Stewart Burchell

     the thing is that in my case I have an old database with years of inconsistent work the information is
    not in an specific field. this could be inside  one of two  fields that are  foreign keys to  2 different tables
    Inside this tables there are some lines with addresses and in the middle of this addresses  I could  find  
    What I’m looking for  is not  a field or something  could be in the middle of the  line 1 or line 2 or line 3 in the first table or in the second
     My approach worked for almost every month  but I found two  months  that are throwing me this error I want to prevent this  from happening I
    Could fix this two inconsistent month just fixing the data issue but it won’t prevent this from happening in the future  that’s why I asked for a  way of doing this or another approach.
     

    this is how it look  when i search for a valid date

    this is one pic of the fields that this could be  in billaddr of shippingaddr is not always at the beginning of the line 2 could be in any  part of one of this lines or in the shipping addr in  in  the  middle of of  any of this lines

  •  I am trying with various combinations, but it is not working. I just need the regular expression which I can use in JMETER which can do the above. regex jmeter. 1v1 battle