*
The moose likes JDBC and the fly likes SELECT * FROM studentrecords where [student id]='1234' doesnt returning the first row in mssql 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 "SELECT * FROM studentrecords where [student id]= Watch "SELECT * FROM studentrecords where [student id]= New topic
Author

SELECT * FROM studentrecords where [student id]='1234' doesnt returning the first row in mssql

amrish sharma
Greenhorn

Joined: Sep 24, 2009
Posts: 20
where 1234 is under [student id]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Is studentid a character column or a numeric column? If numeric, does it work if you remove the quotes? Are you sure there is a studentrecord with that studentid? Are you getting an error, or just no rows selected?


JBoss In Action
 
Don't get me started about those stupid light bulbs.
 
subject: SELECT * FROM studentrecords where [student id]='1234' doesnt returning the first row in mssql
 
Similar Threads
generate Unique key
url rewrite
convert from decimal to byte array but base 8
what does hiobernate Session's update work ?
How to store composite objects in Hibernate