• Post Reply Bookmark Topic Watch Topic
  • New Topic

pass a varble in WHERE clause instaed of a constant

 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 992
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have forgotten the apostrophes that delimit a string literal.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!