Home » U++ Library support » U++ SQL » SQL EXPR NOT WORKING  
	
		
		
			| SQL EXPR NOT WORKING [message #58178] | 
			Tue, 08 March 2022 16:02   | 
		 
		
			
				
				
				
					
						  
						reign_of_terror
						 Messages: 6 Registered: October 2021 
						
					 | 
					Promising Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi all- 
 
SQL * Select(DEPT_NO) 
     .From(EMPLOYEE) 
     .LeftJoin(Select(DEPT_NO).From(DEPT)) 
     .On(DEPT_NO.Of(EMPLOYEE) == DEPT_NO.Of(DEPT)); 
     while(SQL.Fetch()){	 
	PromptOK("FOO"); 
	  // list.Add(SQL[ID]); 
	    } 
 
It should give a message "foo" but it doesn't. It is compiling okay. 
 
They are both listed in sqlexpr postgresql examples side by side in the UPP documentation: 
 
select EMPLOYEE.DEPT_NO 
 
from EMPLOYEE left outer join 
 
(select DEPT_NO from DEPT) AS DEPT 
ON EMPLOYEE.DEPT_NO = DEPT.DEPT_NO 
 
This works in postgresql... 
 
Here is my schema: 
 
 TABLE_ (EMPLOYEE) 
 SERIAL (ID) PRIMARY_KEY  
 STRING_ (EMP_NAME, 100) 
 STRING (DEPT_NO, 10)  
 END_TABLE  
 
TABLE_ (DEPT) 
 STRING_ (DEPT_NO, 10) PRIMARY_KEY 
 STRING_ (DEPT_NAME, 100) 
 STRING_ (DEPT_LOCATION, 100) 
 END_TABLE 
 
Any idea as to why it isn't working?  Sorry to bother you guys! 
 
reign_of_terror  
 
thanks 
 
	   
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 14:29:23 CET 2025 
 Total time taken to generate the page: 0.05155 seconds 
 |