Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-29-2022 06:17 AM
hello
im trying to get variables of an array and create node for them so i have a foreach
to get all of the items and then run this query
Solved! Go to Solution.
06-30-2022 01:18 PM
- use real parameters not string substitution
- if you want to run multiple operations, use session.writeTransaction() and tx.run()
- but the real solution here is to pass in your list of words as a parameter and use UNWIND
UNWIND $words AS word
MERGE (:Word {name:word})
06-30-2022 01:18 PM
- use real parameters not string substitution
- if you want to run multiple operations, use session.writeTransaction() and tx.run()
- but the real solution here is to pass in your list of words as a parameter and use UNWIND
UNWIND $words AS word
MERGE (:Word {name:word})
07-01-2022 11:37 PM
my word list is like this [He,says,that,with,my,imaginative,power,and,habit,of,story-making,a,nervous,weakness,like,mine,is,sure,to,lead,to,all,manner,of,excited,fancies,and,that,I,ought,to,use,my,will,and,good,sense,to,check,the,tendency,.]
when i try to use query with unwind it wont insert any thing into database
my code is
07-02-2022 12:15 AM
i tried what u said but didn't work . my list is like this [He,says,that,with,my,imaginative,power,and,habit,of,story-making,a,nervous,weakness,like,mine,is,sure,to,lead,to,all,manner,of,excited,fancies,and,that,I,ought,to,use,my,will,and,good,sense,to,check,the,tendency,.]
my query is this :
07-02-2022 04:51 AM
What does "didn't work" mean?
I can't see anything (except database connection credentials being wrong) as a reason for this not to work.
07-03-2022 01:13 AM
look my connection its ok cause i test some queries it was fine
here is my list that im testing on
07-03-2022 02:12 AM
i fixed it it was because of node js
as i said my list was something like this ["test","test1"] but in node js when u wanna use that list it is like this [test,test1] so i add " " to them and then unwind them and it fixed
tnx a lot sir
All the sessions of the conference are now available online