Convert from newer sql server to old style ansi sql without join keyword -


we migrating new database platform, polyhedra that strictly old school ansi sql without word 'join'. here trying if sql server:

select a.* tbla left join tblb b on a.f1 = b.f1 b.f1 null 

i can't seem recreate put join in clause

like:

select a.* tbla a, tblb b a.f1 = b.f1 , b.f1 null 

obviously, doesn't return records when tblb empty. idea how done?

your query doesn't require join @ all.

select  a.*     tbla    not exists (select 1 tblb b a.f1 = b.f1); 

i've had quick flick through polyhedra sql reference manual (available here), , can't see looks equivalent of *= or (+) sql-server , oracle use respectively, think might have resort left joins need columns (as far can tell polyhedra supports union):

select  a.f1 a, b.f1 b    tbla a, tblb b   a.f1 = b.f1 union select  a.f1 a, null b    tbla   not exists (select 1 tblb b a.f1 = b.f1); 

example on sql fiddle (not in polyhedra)

addendum

since not exists not allowed, not in is,

select  a.f1 a, b.f1 b    tbla a, tblb b   a.f1 = b.f1 union select  a.f1 a, null b    tbla   a.f1 not in (select b.f1 tblb b b.f1 not null); 

there number of free dbms out there, if @ possibile strongly recommend looking @ other vendors.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -