Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB-QL Locate

EJ Dinglasan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!
I'm quite confused on how EJB-QL function LOCATE works.
Correct me if I'm wrong but doesn't it works like String.indexOf()?
It returns the specified position where the search string is located in the searched string.
Does it return a negative value when the search string is not found?
I have an author field
this line
locate(, 'Lee') doesnt return a positive number
but my table contains records with fields having the value of "Stan Lee".
I'm quite confused really what should be the return value of this function.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic