spliiting of the values

my data is storing in the data base in the formate of customer number :"F123"  i have serch filter when i search with F123 it is returing the related data but now if i search with customer number with padding (0) like "F000123" it shoud return the data whic have returen for "F123",

the customer number is passing to stored proc and getting the out put so my queery is before sending input to the stored proc i need to remove the padded values then need to send to stored proc please me with solution 

so how can i remove the padded (0) from the value where i am searching

  Discussion posts and replies are publicly visible

Parents
  • Assuming your Customer Number format always leads with a single aplha character with remainder as numerics you can do this:

    a!localVariables(
      local!character1: fn!left(ri!customerNumber, 1),
      local!remainingCharacters: fn!right(
        ri!customerNumber,
        fn!len(ri!customerNumber) - 1
      ),
      fn!concat(
        local!character1,
        fn!tointeger(local!remainingCharacters)
      )
    )

  •  actal customer number is "F1234" have certain records related for that passed as input to stored proc and i get related data,, if i search like "F0001234" it should pass input to stored proc as "F1234" and have to get  data related to it the above qury is removing F also  so before passing to the stored proct what ever the customer number in database  it should be same and need to be removed the extra padded charecters

Reply
  •  actal customer number is "F1234" have certain records related for that passed as input to stored proc and i get related data,, if i search like "F0001234" it should pass input to stored proc as "F1234" and have to get  data related to it the above qury is removing F also  so before passing to the stored proct what ever the customer number in database  it should be same and need to be removed the extra padded charecters

Children
No Data