Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Select Where Clause in servlet

 
Jack Adams
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have code that contains select stmts. The select stmts' where clauses are appended with DOZENS (HUNDREDS) of conditions. A select stmt can run fine for weeks and then break when a specific condition is choosen from web page.

ex.
select e.name, e.employeeid, e.birthdate, c.name
from employee , company
....
if (filter on name)
name = thename
-error name not qualified
s/b
e.name = thename

How should this be handled/designed future/present?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34371
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jack,
How are you testing your code before you release it? You need to make sure all the conditions are tested. Can you do a "sanity check" query by testing all the conditions at once?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic