Joined: Wed Nov 19, 2008 2:04 pm Posts: 4				
			 | 
			
				
				
					| 
					
						 Hi,
 
 I have to use native sql in hibernate.
 
 when is issue the below query it is fetching records 
 
 		String query="select order_number  from oha"   Query queryHql=hibernateSession.createSQLQuery(query.toString());
 		List list=queryHql.list();
 
 it is fetching all records.
 
 But when i add where condition 
 
 String query="select order_number  from oha where xxx='CC'"
 
 there comes no results eventhough there are records matching with the criteria.
 
 Can anybody please guide me on how to use a simple native sql query with where clause.
 
 Also I need some more info related to native subqueries using Hibernate
 
 thanks in advance
 Prasad Karri 
					
  
						
					 | 
				 
				 
			 |