aspose file tools*
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
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: 5836
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SELECT * FROM studentrecords where [student id]='1234' doesnt returning the first row in mssql