Re: Converting SQL View to Oracle View

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Fri, 02 Aug 2002 01:51:05 GMT
Message-ID: <dAl29.729029$352.159992_at_sccrnsc02>


What errors do you get?
convert won't work. You could just take convert to float out and maybe the round also.
Jim
"Jack Colletta" <email_at_colletta.com> wrote in message news: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 (
> sShift,
> lOEEConfigWorkcellId,
> sWorkcellDescription,
> tstart,
> tEnd,
> sPartDescription,
> sHeatCode,
> sJobNumber,
> dCutWeight
>
> )
> as
>
> 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
> and lOEEConfigWorkcellId = e.lOEEConfigWorkcellId
> ),
>
> sHeatCode=(select max(sStartVal) from OEEEvent
> where lOEEConfigEventId in (select lOEEConfigEventId from
> OEEConfigEvent where sDescription = 'Heat Code')
> and tEnd = e.tEnd
> and lOEEConfigWorkcellId = e.lOEEConfigWorkcellId
> ),
>
> sJobNumber=(select max(sStartVal) from OEEEvent
> where lOEEConfigEventId in (select lOEEConfigEventId from
> OEEConfigEvent where sDescription = 'Job Number')
> and tEnd = e.tEnd
> 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 Fri Aug 02 2002 - 03:51:05 CEST

Original text of this message