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 » Postgresql - execpt vs minus
Postgresql - execpt vs minus [message #22969] Thu, 03 September 2009 11:57 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

Postgresql uses "except" not "minus", so SqlSet operator- and SqlSelect::operator-= should be modified:

SqlSelect& SqlSelect::operator-=(const SqlSelect& s2) {
	text << SqlCase(PGSQL," except (")(" minus (") << s2.text << ')';
	return *this;
}

SqlSet operator-(const SqlSet& s1, const SqlSet& s2) {
	if(s1.IsEmpty() || s2.IsEmpty())
		return s1;
	return SqlSet(s1() + SqlCase(MSSQL|PGSQL, " except ")(" minus ") + s2(), SqlSet::SETOP);
}

Re: Postgresql - execpt vs minus [message #22983 is a reply to message #22969] Fri, 04 September 2009 14:27 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks. Applied.

Mirek
Previous Topic: [sql] Select embeded in join
Next Topic: Postgresql and bool
Goto Forum:
  


Current Time: Thu Mar 28 09:43:08 CET 2024

Total time taken to generate the page: 0.01443 seconds