Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » SQL EXPR NOT WORKING
SQL EXPR NOT WORKING [message #58178] Tue, 08 March 2022 16:02 Go to previous message
reign_of_terror is currently offline  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

 
Read Message
Read Message
Previous Topic: SQLEX. Is it possible to specify a different name for a real column?
Next Topic: truncated error message / MariaDB
Goto Forum:
  


Current Time: Mon Apr 29 14:08:24 CEST 2024

Total time taken to generate the page: 0.02847 seconds