Converting SQL View to Oracle View
Date: 1 Aug 2002 07:48:46 -0700
Message-ID: <7b81cff.0208010648.2e3d2479_at_posting.google.com>
I am new to Oracle (8i in particular), but I need to convert this
Mssql view to Oracle. I have tried but I keep fighting with db
studio... Any help would be great. Thanks in advance
Jack
Create View ForgeShopProduction (
)
select e.sShift, e.lOEEConfigWorkcellId, cwc.sDescription,
min(e.tstart),e.tEnd,
sPartDescription=(select max(sStartVal) from OEEEvent
where lOEEConfigEventId in (select lOEEConfigEventId from
OEEConfigEvent where sDescription = 'Part Description')
and tEnd = e.tEnd
sHeatCode=(select max(sStartVal) from OEEEvent
where lOEEConfigEventId in (select lOEEConfigEventId from
OEEConfigEvent where sDescription = 'Heat Code')
and tEnd = e.tEnd
sJobNumber=(select max(sStartVal) from OEEEvent
where lOEEConfigEventId in (select lOEEConfigEventId from
OEEConfigEvent where sDescription = 'Job Number')
and tEnd = e.tEnd
sShift,
lOEEConfigWorkcellId,
sWorkcellDescription,
tstart,
tEnd,
sPartDescription,
sHeatCode,
sJobNumber,
dCutWeight
as
and lOEEConfigWorkcellId = e.lOEEConfigWorkcellId
),
and lOEEConfigWorkcellId = e.lOEEConfigWorkcellId
),
and lOEEConfigWorkcellId = e.lOEEConfigWorkcellId
dCutWeight=(select round(convert(float,max(sStartVal)), 1) from
OEEEvent
where lOEEConfigEventId in (select lOEEConfigEventId from
OEEConfigEvent where sDescription = 'Cut Weight')
and tEnd = e.tEnd
and lOEEConfigWorkcellId = e.lOEEConfigWorkcellId
)
from OEEEvent e, OEEConfigWorkcell cwc, OEEConfigEvent ce where e.lOEEConfigEventId = ce.lOEEConfigEventId and e.lOEEConfigWorkcellId = cwc.lOEEConfigWorkcellId and e.sFolder = 'Additional Data'
group by e.sShift, e.lOEEConfigWorkcellId, cwc.sDescription, e.tEnd Received on Thu Aug 01 2002 - 16:48:46 CEST