This doesn't really make sense, did you read through the Cypher online
training?
you probably mean something like
MATCH (personalData:PersonalData) -[:USED_ON]-> (resource:Resource)
<-[:OWNS]-(org:Organisation {organisationId : 'XXX-YYYY-ZZZ'} )
*MATCH (personalDataItem : PersonalDataItem) <-[:CONTAINS_DATA_ITEM]- (*
personalData*)*
*WITH personalData, max(**personalDataItem.sensitivity) as maxSensitivity*
*SET *personalData.sensitivity = *maxSensitivity*
*or in one single MATCH pattern*
MATCH*(personalDataItem : PersonalDataItem)
<-[:CONTAINS_DATA_ITEM]-*(personalData:PersonalData)
-[:USED_ON]-> (resource:Resource) <-[:OWNS]-(org:Organisation
{organisationId : 'XXX-YYYY-ZZZ'} )
*WITH personalData, max(**personalDataItem.sensitivity) as maxSensitivity*
*SET *personalData.sensitivity = *maxSensitivity*
On Mon, Nov 7, 2016 at 7:53 PM, Ajay Krishnamurthy <[email protected]>
wrote:
> I am in need to update the PersonalData object with the maximum of
> sensitivity value of its PersonalDataItems.
> Below query throwing the error : Invalid input 'R': expected
> whitespace,[near *RETUTN MAX(personalDataItem.sensitivity) AS mxVal*]
>
> Please help me to resolve this ..
>
> QUERY :
>
> WITH personalDatas = (PersonalData) -[:USED_ON]-> (resource:Resource)
> <-[:OWNS]-(org:Organisation {organisationId : 'XXX-YYYY-ZZZ'} )
> UNWIND personalDatas AS personalData
> SET personalData.sensitivity =
> * (WITH(personalDataItem : PersonalDataItem) <-[r:CONTAINS_DATA_ITEM]- (pd
> : PersonalData {id: ID(personalData)}) RETUTN
> MAX(personalDataItem.sensitivity) AS mxVal)*
>
> *Thanks & Regards*
> *Ajay*
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" 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.
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" 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.