XQuery Syntax Error

Hello,
I am trying to execute the following Xquery statement:

String xq2=“for $b in input()/Mitarbeiter where $b/Adresse=”+“Frankfurt”+“return $b”;

XQuery parsing error, Syntax Error at line 1, column 64: found Variable when expecting any of: “or”, “and”, “div”, “mod”, " *", “return”, “intersect”, “union”, “except”, “/”, “//”, “=”, “!=”, “<=”, “>=”, “eq”, “ne”, “gt”, “ge”, “lt”, “le”, "< ", “>”, “-”, “+”, “=>”, “|”, “(”, “[”, “sort”, “stable”)

What is wrong with my statement? Has somebody experience with this case?

Thanks in advance!
chacha

White spaces between condition and results. Notice the ". You can also use '.


String xq2 = "for $b in input()/Mitarbeiter where $b/Adresse=\"Frankfurt\" return $b"

Hi Pfil,
:smiley: It works!
:frowning: But I don’t get along with the query expressions in other cases. Such as…

String xq5=“for $a in input()/Mitarbeiter where $a/Vorname=“Lucy” do {insert Frankfurt following $a/Adresse}”;

Would you please recommend a tutorial about this topic?

Regards,
chacha