Search Postgresql Archives

Re: SQL operator '*='

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Apitz schrieb am 23.12.2019 um 15:33:
I've here a smaller problem of our porting from Sybase/Oracle/Informix
code to PostgreSQL; the code reads for the mentioned DBS:


#ifdef DBSORA
	EXEC SQL DECLARE land_cursor CURSOR FOR
		SELECT stammprio, lkz, landbez, plkz, postbez, karenz1, karenz2,
			karenz3, land.wkz, webez, we, kurs, land.del
		FROM   land, devisen
		WHERE  land.wkz = devisen.wkz (+) AND land.brgroup = devisen.brgroup (+) AND land.brgroup = :brgroupHost_for_helpland_cursor
		ORDER  BY stammprio, landbez;
#endif

#ifdef DBSSYB
	EXEC SQL DECLARE land_cursor CURSOR FOR
		SELECT stammprio, lkz, landbez, plkz, postbez, karenz1, karenz2,
			karenz3, land.wkz, webez, we, kurs, land.del
		FROM   land, devisen
		WHERE  land.wkz *= devisen.wkz AND land.brgroup *= devisen.brgroup AND land.brgroup = :brgroupHost_for_helpland_cursor
		ORDER  BY stammprio, landbez;
#endif

(the code for DBSPOS was just copied from Sybase). It compiles fine but
raises on execution en error about operator '*=' is not supported...

T-SQL (Sybase and SQL Server) uses *= for outer joins, just as Oracle uses (+)

Haven't used either of those outdated operators in decades, but I think the equivalent would be:

FROM land
  LEFT JOINdevisen
    on land.wkz = devisen.wkz
   AND land.brgroup = devisen.brgroup
   AND land.brgroup = :brgroupHost_for_helpland_cursor







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux