2. Juli 201015 j Hallo! da ich ein SQL-Noob bin wende ich mich Vertrauenvoll an dieses Forum ich habe folgendes SQL-STATEMENT: select e.event_position_id, p.position_id, p.code, g.gamedev_id, g.position_id, s.gamedev_id from xxx.event_log e, xxx.position p, xxx.gamedev g, xxx.gamedev_slot s where p.position_typ = 1 and p.bso_id is not null and e.event_id = 2001 and e.Par_value_1 = 0 ------------------------------------------------------------------ [COLOR="Green"]and e.event_time between trunc(sysdate) +(( trunc (sysdate, HH24)-1)/24 -5/24/60) and trunc(sysdate) +(( trunc (sysdate, HH24) -1 )/24) +5/24/60 [/COLOR] -------------------------------------------------------------------- and g.gamedev_typ = 1 and s.sma_smc_id = Null and s.stm_id = null and s.mdc_ID =null and e.event_position_id = G.POSITION_ID and g.gamedev_id = s.gamedev_id; mein Problem ist das Trunc (sysdate, hh24) da er mir im Toad eine "Invalid Identifier" Meldung Bringt - ich habe hier ein Eventlog, welches ich auslese und ich hätte gerne das Between +5 mins und -5mins von jeder vollen stunde (der sqlaudruck zwischen den ------------- und in Grün) - danke schon jetztmal für eure Hilfe lg michael
2. Juli 201015 j HH24 ist ein String und muss dementsprechend natürlich in ' ' geschrieben werden. trunc(sysdate,'HH24') Dim
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.