Advanced Query ORACLE

Advanced Query ORACLE

  
Does anyone knows if this query is correct in ORACLE (syntax) ?
I just have sql server and need to know it.

thanks in advance

SELECT {MetaCIs}.* , {Router_Switch}.* , NULL as bool
FROM ({MetaCIs} Inner JOIN {Router_Switch} ON ({Router_Switch}.[METACIID] = {MetaCIs}.[ID]))
WHERE ({Router_Switch}.[ISDELETE] = 0) AND (({Router_Switch}.[NETWORKNAME] LIKE @Search) OR ({Router_Switch}.[ASSOCIATEDIP] LIKE @Search))
AND {Router_Switch}.[ID] NOT IN (
SELECT {Router_Switch}.[ID]
FROM (({MetaCIs} Inner JOIN {Router_Switch} ON ({Router_Switch}.[METACIID] = {MetaCIs}.[ID]))
Inner JOIN {ExternalNetworkDevices} ON ({ExternalNetworkDevices}.[CONNECTTOROUTERSWITCHID] = {Router_Switch}.[ID]))
WHERE ({Router_Switch}.[ISDELETE] = 0) AND (({Router_Switch}.[NETWORKNAME] LIKE @Search) OR ({Router_Switch}.[ASSOCIATEDIP] LIKE @Search)) AND
(({ExternalNetworkDevices}.[ID]= @ExternalNetworkDevices_ID) and ({ExternalNetworkDevices}.[ID] is not null) )
)
UNION

SELECT {MetaCIs}.* , {Router_Switch}.* , 'TRUE' as bool
FROM (({MetaCIs} Inner JOIN {Router_Switch} ON ({Router_Switch}.[METACIID] = {MetaCIs}.[ID]))
Inner JOIN {ExternalNetworkDevices} ON ({ExternalNetworkDevices}.[CONNECTTOROUTERSWITCHID] = {Router_Switch}.[ID]))
WHERE ({Router_Switch}.[ISDELETE] = 0) AND (({Router_Switch}.[NETWORKNAME] LIKE @Search) OR ({Router_Switch}.[ASSOCIATEDIP] LIKE @Search)) AND
( ({ExternalNetworkDevices}.[ID]= @ExternalNetworkDevices_ID) and ({ExternalNetworkDevices}.[ID] is not null) )

ORDER BY @OrderBy
Hi there

Since this query does not appear to have any T-SQL instructions (like DATEDIFF, for instance) there is no reason it should not work in Oracle.

However, if your application is to work correctly with Oracle, you should really test it with an Oracle installation (or, at least, test the produced query against an Oracle Database).

What edition of the OutSystems Platform are you using? If you have a license that allows it (other than the free Express edition), you can easily install Oracle 10g Express in any available computer and reconfigure your OutSystems Platform to use it; afterwards, you would only have to publish the eSpace (or eSpaces) and see if it works.

Cheers,

Acácio Porta Nova, Jr.