This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes pass a varble in WHERE clause instaed of a constant Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "pass a varble in WHERE clause instaed of a constant" Watch "pass a varble in WHERE clause instaed of a constant" New topic
Author

pass a varble in WHERE clause instaed of a constant

naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 380

hi ranchers ,

i'm developing a application in JavaScript for TItanium(Android) where i need to execute a query something like :
i had number of rows in database with same date so i need to figure out that for each date how many rows are there
let say

above is working fine it is returing 2 rows

but i need to pass date in a variable like


its not working as desired returning 0 rows.how can i resolve this?
Ivan Jozsef Balazs
Ranch Hand

Joined: May 22, 2012
Posts: 380
You might have forgotten the apostrophes that delimit a string literal.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pass a varble in WHERE clause instaed of a constant
 
Similar Threads
Convert to timestamp yyyy-MM-dd hh:mm:ss a
calculating difference between two dates in access
Dates between different databases
Select date field problem
Performence issue:Write query directly in session bean or call storted procedure