Subject:Error at line 1, column 126. Unexpected token "" for step expression. Author:Tony Serva Date:11 Dec 2007 09:09 PM
Hi,
Trying to use xquery and when I try to preview the result it stops and gives this error: [DataDirect][XQuery][err:XPST0003]Error at line 1, column 126. Unexpected token "<end of expression>" for step expression.
Any ideas to help a struggling newbie
Thanks,
Tony
Subject:Error at line 1, column 126. Unexpected token Author:Minollo I. Date:11 Dec 2007 09:15 PM
It's difficult to give you an answer without seeing the query you are trying to run... Now, using my crystal ball I tend to guess that you have an XPath expression at the end of the line which ends with "/", like in "$a/b/"; maybe what you are trying to do is "$a/b"? Or "$a/b/*"? The crystal ball is unclear about that...
Subject:Error at line 1, column 126. Unexpected token Author:Tony Serva Date:12 Dec 2007 11:24 AM Originally Posted: 12 Dec 2007 11:23 AM
I guess I was thinking that it had more to do with the data and a special character was causing it. Sorry I did not give you more to work with.
I was following the training video on xquery. I was using my own data source.I was trying to create a simple FLWOR query by dragging and dropping the table onto the xquey window.
But I get the same error using the customers table in Northwind.
The query is this. It is the one SS created when I tried to create a FLWOR
for $vListings_Trulia_Export in collection("myDatabase.dbo.myTable")/s:sequence/myTable return
for $Customers in collection("Northwind.dbo.Customers")/Customers return
Subject:Error at line 1, column 126. Unexpected token Author:Minollo I. Date:12 Dec 2007 11:34 AM
The query just needs to be completed with what you need; a simple test can be:
for $Customers in collection("Northwind.dbo.Customers")/Customers return $Customers
How did you create the one that mentions s:sequence? You shouldn't need to do that.
Subject:Error at line 1, column 126. Unexpected token Author:Tony Serva Date:12 Dec 2007 11:47 AM Originally Posted: 12 Dec 2007 11:44 AM
I was just following the video. In it the guy dragged the Customers item over to the XQuery source window, selected the FLWOR option, and hit the green run arrow. The "/s:sequence" was created automatically. It is in the tree in the file explorer.
It goes:
Customers
s:sequence
xmlsn:s
Customers
field names...
BTW your suggestion worked. I removed the s:sequence and added the $Customers at the end.
for $Customers in collection("Northwind.dbo.Customers")/s:sequence/Customers return $Customers