Hi,

I am attempting to select vertices from *Class1* where property 'Day' = 4 
of *Date *Vertex

*Class1 *has an Edge (out) to *DateVertex*


*My attempt which returns nothing...*

select from Class1 
let $temp = (
    select * from (
        traverse v.In, E.out from $parent.current
    )
)
where $temp.Day = 4


*Here's a solution that works*

select from Action where out('DateCreated')[0].Day = 4


Problem is, is that I'd like to assign a variable ($temp), as I want to 
convert it to a date, so that I can use it in order by clause, for 
example...

select from Class1 
let $temp = (
    select * from (
        traverse v.In, E.out from $parent.current
    )
)
order by $temp desc

I haven't figured out how to format $temp values as dates, although I have 
the following which may work

select Date(format("%s-0%s-0%s 00:00:00", Year, Month, Day)) as datecreated 
from Date order by datecreated desc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to