Home » U++ Library support » U++ SQL » Format of Select statement inside Insert..?? 
	
		
		
			| Format of Select statement inside Insert..?? [message #33748] | 
			Sat, 10 September 2011 14:00   | 
		 
		
			
				
				
				
					
						  
						Monty.mvh
						 Messages: 31 Registered: July 2011  Location: Bangalore
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi, 
 
I have two tables Master and Slave. 
I should access value of KEY_1 generated in Master table in slave table.. How to achieve this..? 
I tried with the statement   
SQL & Insert(SLAVE) (KEY_1,'Select (KEY_1) .From(MASTER)'); 
 and i got some junk value than the required ..  
 Is the above Statement correct..??  
 
table1.sch: 
 
TABLE_ ( MASTER ) 
INT_ ( KEY_1 ) PRIMARY_KEY AUTO_INCREMENT 
STRING_ ( DATA, 20 ) PRIMARY_KEY 
END_TABLE 
 
 
TABLE_ ( SLAVE ) 
INT ( KEY_1 ) 
INT_ ( MKEY ) PRIMARY_KEY  AUTO_INCREMENT 
STRING_ ( TYPE, 40 ) 
END_TABLE 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 15:55:05 CET 2025 
 Total time taken to generate the page: 0.06161 seconds 
 |