wood burning stoves 2.0*
The moose likes JDBC and the fly likes executing a statement !!!!!!! 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 "executing a statement !!!!!!!" Watch "executing a statement !!!!!!!" New topic
Author

executing a statement !!!!!!!

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

when i try to execute below query in jdbc..i get error that:

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'emp'.

but it is executing in sqlserver window..
what is the problem..

any one please explain me..how to get the resultset?
--------------------------------------------------------
select emp.employeeid,emp.name,emp.experience,emp.phone,
emp.email,dep.depname dn,emp.fathername,emp.taddr,emp.paddr,
emp.skills,emp.qualification,emp.dob,emp.gender,emp.maritals,emp.dateofjoin
from employeetable emp,departments dep where emp.depid=dep.depid;
-------------------------------------------------------------

thanks & regards,
seetharaman
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

i find the error..problem is my code only...i rearrange the code now it is working..

thanks & regards,

seetharaman
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321


i find the error..problem is my code only...i rearrange the code now it is working..


:thumb:


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: executing a statement !!!!!!!
 
Similar Threads
How to get top 3 earners in emp table of SCOTT's schema using SQL
how to fetch data from resultset containing result of two queries
Getting table name for column
Connection is busy with results for another hstmt
How to write to TO_CHAR and TO_DATE in HQL