| Author | 
		  Message
		 | 
		
		  | er_pankajgupta84 | 
		  
		    
			  
				 Posted: Thu Apr 02, 2009 3:59 am    Post subject: Problem Creating MbSQLStatement for Update with SubQuery | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 14 Nov 2008 Posts: 203 Location: charlotte,NC, USA 
  | 
		  
		    
			  
				Hi I need to run the following query using Java and MbSQLStatement.
 
 
I am able to run it on  the database.
 
 
UPDATE mdeai.EAI_NOTIF_ROUTE  SET EAI_NOTIF_TS = '2009-04-02-06.42.51.969' 
 
WHERE SERVICE_ID = (select service_id from EAI_SERVICE where service_name = 'AR_BILLING_I0015' ) and 
 
COUNTRY_CODE = 'GB' and ERR_SEVERITY_CODE = 
 
(select ERR_SEVERITY_CODE from ERROR_SEVERITY where  ERR_SEVERITY_DESC ='Critical') and REQUEST_TYPE_CODE ='WW_EXCEPTION_PAYLOAD_REPLAY_FLOW' and Notif_TYPE_ID =
 
 
(select Notif_Type_ID from EAI_NOTIF_TYPE where notif_type_NAME ='EMAIL') 
 
 
I tried various format for creating a query string but none of them is working.
 
 
Any help pointers would be useful. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | er_pankajgupta84 | 
		  
		    
			  
				 Posted: Thu Apr 02, 2009 10:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 14 Nov 2008 Posts: 203 Location: charlotte,NC, USA 
  | 
		  
		    
			  
				| Any pointer would be appreciated | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Apr 02, 2009 11:46 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| er_pankajgupta84 wrote: | 
   
  
	| Any pointer would be appreciated | 
   
 
 
 
And when someone has something to add, I'm sure they'll add it.    
 
 
We don't have an SLA on replies. If it's an urgent issue raise a PMR. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | er_pankajgupta84 | 
		  
		    
			  
				 Posted: Thu Apr 02, 2009 4:03 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 14 Nov 2008 Posts: 203 Location: charlotte,NC, USA 
  | 
		  
		    
			  
				I solved the problem
 
 
here is the query..
 
 
UPDATE Database.MDEAI.EAI_NOTIF_ROUTE AS T SET EAI_NOTIF_TS = '2009-05-05-06.42.51.969' WHERE T.REQUEST_TYPE_CODE ='WW_EXCEPTION_PAYLOAD_REPLAY_FLOW' and T.COUNTRY_CODE = 'GB' and T.SERVICE_ID = THE(select ITEM A.service_id from Database.MDEAI.EAI_SERVICE AS A where A.service_name = 'AR_BILLING_I0015' ) and T.ERR_SEVERITY_CODE = THE(select ITEM B.ERR_SEVERITY_CODE from Database.MDEAI.ERROR_SEVERITY AS B where  B.ERR_SEVERITY_DESC ='Critical') and T.Notif_TYPE_ID =THE(select ITEM C.Notif_Type_ID from Database.MDEAI.EAI_NOTIF_TYPE AS C where C.notif_type_NAME ='EMAIL') | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Apr 02, 2009 10:46 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| er_pankajgupta84 wrote: | 
   
  
	I solved the problem
 
 | 
   
 
 
 
And thank you for posting the soloution for the benefit of others!    
 
 
         _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |