Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

executing a statement !!!!!!!

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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


:thumb:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic