wood burning stoves 2.0*
The moose likes JDBC and the fly likes date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "date format" Watch "date format" New topic
Author

date format

phani ravinutala
Greenhorn

Joined: Jun 25, 2009
Posts: 26
I want to build a query by using the condition month and year of date not the day.

Here is my query;



But the above query is very slow. Is there any other date format for month and year to make it faster.

thanks
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
I don't think an SQL based query belongs into the JSP forum.

If your empdate field is indexed, this key cannot be used if you use it with a function.

This way the key is usable



JDBCSupport - An easy to use, light-weight JDBC framework -
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Consider Paul's rocket mass heater.
 
subject: date format
 
Similar Threads
request.getParameter retuning null
date operations in Hibernate
Problem with date validation
Retrieve value from a DateField
invoke functions in a jpl query