Hi
Running 8.5.3 on windows.
Currently open database is RaceXML1.
I am running the example from here http://docs.basex.org/wiki/Databases
for $i in 1 to 100 return db:open('books' || $i)//book/title
as
for $i in 1 to 100 return db:open('RaceXML1' || $i)//meeting/race What occurs though is that the iterable is concatenated to the database name and subsequently not found.
Error: Stopped at C:/Users/Sayth/Documents/firstquery.xq, 2/15: [bxerr:BXDB0002] Database 'RaceXML11' was not found.
To new to xquery to know why this is wrong.
Full error is
Error: Stopped at C:/Users/Sayth/Documents/firstquery.xq, 2/15: [bxerr:BXDB0002] Database 'RaceXML11' was not found. Compiling: - pre-evaluating (1 to 100) - rewriting descendant-or-self step(s) Optimized Query: for $i_0 in (1 to 100) return db:open(concat("RaceXML1", $i_0))/descendant::meeting/race Query: for $i in 1 to 100 return db:open("RaceXML1" || $i)//meeting/race Query plan: <QueryPlan compiled="true"> <GFLWOR> <For> <Var name="$i" id="0"/> <RangeSeq from="1" to="100"/> </For> <CachedPath> <DbOpen name="open(database[,path])"> <FnConcat name="concat(atom1,atom2[,...])"> <Str value="RaceXML1" type="xs:string"/> <VarRef> <Var name="$i" id="0"/> </VarRef> </FnConcat> </DbOpen> <IterStep axis="descendant" test="meeting"/> <IterStep axis="child" test="race"/> </CachedPath> </GFLWOR> </QueryPlan>
Can you help?
Sayth