Noone can help me with this ? vineri, 20 martie 2015, 13:19:19 UTC+2, Mihai Pricop a scris: > > Hi, > > I am trying to use the LET clause to stock some information in an > sub-query, keep the information relative to the record. After another > select from the query where I save the variable, the variable holds the > value only of the last record. > > For example, a query over the GratefulDeadConcerts: > > select *,$u from (select from (select expand(both()) from #9:8 limit 10) >> let $u = $current.performances) > > > This results in: > > @rid@version@classperformancessong_typenametypeout_followed_by > out_written_byout_sung_byin_followed_by$u#9:1 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:1> > 25V5coverHEY BO DIDDLEYsong[5][1][1][4]65#9:4 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:4> > 265V394originalBERTHAsong[53][1][1][76]65#9:5 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:5> > 177V293coverGOING DOWN THE ROAD FEELING BADsong[39][1][1][46]65#9:12 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:12> > 167V312originalCASEY JONESsong[47][1][1][33]65#9:13 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:13> > 297V423originalDEALsong[80][1][1][65]65#9:17 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:17> > 161V328originalSTELLA BLUEsong[31][1][1][46]65#9:21 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:21> > 237V241coverCOLD RAIN AND SNOWsong[56][1][1][59]65#9:22 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:22> > 225V332originalUNCLE JOHNS BANDsong[49][1][1][60]65#9:28 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:28> > 35V234originalMISSISSIPPI HALF-STEPsong[7][1][1][7]65#9:29 > <http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:29> > 139V65originalHERE COMES SUNSHINEsong[34][1][1][32]65 > The value of $u will always be 65 cause the last record has the > performances value of 65. Why is this happening ? > > I am running OrientDB v1.7.4. Hope someone can help me understand what is > happening. If it is a bug of some sort, how can I go around it, and get my > output ? >
-- --- 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 orient-database+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.