AnsweredAssumed Answered

Translate query from SQL to NSQL

Question asked by patricioosde on Sep 6, 2013
Latest reply on Sep 7, 2013 by clarityeur
Hello everybody, my name is Patricio and I want translate the following query from SQL to NSQL, somebody can help me?, because I try to translate this query but Clarity show an error.In SQL this query bring me the results ok.

select *
from (
select idgdm, sumario, gerencia, clasedereq, restricciones, porccompl, fechainicio, fechafin, costogdm,
Duracion
from (
select prj.osde_id_gdm as idgdm, iinv.NAME as sumario, inv.osde_gerencia as gerencia,
inv.osde_tipo_req as clasedereq, inv.osde_restricciones as restricciones,
iprj.PERCENT_COMPLETE as porccompl, iinv.SCHEDULE_START as fechainicio,
iinv.SCHEDULE_FINISH as fechafin, ffin.PLANNED_CST_TOTAL as costogdm,
DATEDIFF(DAY,iinv.SCHEDULE_START,iinv.SCHEDULE_FINISH) AS duracion


from ODF_CA_PROJECT as prj,


ODF_CA_INV as inv


left outer join FIN_FINANCIALS as ffin on inv.ID=ffin.ID,


INV_INVESTMENTS as iinv,


INV_PROJECTS as iprj





where prj.id = iprj.PRID


and inv.ID = iinv.ID


and prj.id = inv.ID
and inv.id!=5011001 and inv.id!=5012002






) as subq
)T

Outcomes