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

strange problem

 
Vaibhav Deshpande
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,

My database is MYSQL and using struts framework.

I am trying to run one sql that is

Select GC.GEN_Code_Id, GC.GEN_Code_Type_Id, GC.GEN_Code
From GEN_Code_Types GCT, GEN_Codes GC
Where GCT.GEN_Code_Type_Id = GC.GEN_Code_Type_Id
And GCT.GEN_Code_Type = 'US_Military_Service_Code_Id'
And GCT.GEN_Valid_Record_Flag = 1
And GC.GEN_Valid_Record_Flag = 1
Order By 1

THis sql executes file.

I am writing code like

result = resultset.getString("GC.GEN_Code");
The above line executes fine in window env. but same code when tried to run on linux m/c
I got error msg for above lien that "GC.GEN_Code" column doesn't exist.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try without your table alias "GC" like

result = resultset.getString("GEN_Code");


hope this work
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic