Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB-QL Locate  RSS feed

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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!