It queries "RDBMS" from the database. I want that the script queries any word contains any "R _ _ _ S" . The result will come out.
In SQL, I understand we can use ( select dataSourceType from data where dataSourceType like 'r_ _ _s') .
I hope this helps.
thank you
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
Albert Hopkins wrote:
you can see this line.
It queries "RDBMS" from the database.
This doesn't query "RDBMS" from the database at all. It just compares the string "RDBMS" with the string value as referenced by 'dataSourceType'.
I want that the script queries any word contains any "R _ _ _ S" . The result will come out.
In SQL, I understand we can use ( select dataSourceType from data where dataSourceType like 'r_ _ _s') .
I hope this helps.
thank you
This is database specific. Consult its documentation. In MySQL you could do so, but then without spaces.
This has still nothing to do with JSP at all. If you were writing this code in a JSP file, you should immediately stop this and moving it into a real Java class. Scriptlets are a bad practice.
Albert Hopkins
Greenhorn
Joined: Jul 21, 2007
Posts: 21
posted
0
Thank you.
Albert Hopkins
Greenhorn
Joined: Jul 21, 2007
Posts: 21
posted
0
ok...
the script compares string
"RDBMS" using .equals
How if i don't want to use equals, because I want the script to compare without using the whole "RDBMS". Just compare "R....S" ??