If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Xquery declare namespace returns error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-08, 07:30
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Xquery declare namespace returns error

Hi,
on DB2 v9.5 fp2 on Linux I would like to declare namespace in Xquery. I wrote the following code:
Code:
XQUERY declare namespace ns1="http://data.si.snt.eu"
But got the following error:
Code:
SQL16002N  An XQuery expression has an unexpected token
""http://data.si.snt.eu"" following "eclare namespace ns1". Expected tokens
may include: "<space>". Error QName=err:XPST0003.  SQLSTATE=10505
Any idea what is wrong with the code?
Regards
Reply With Quote
  #2 (permalink)  
Old 12-12-08, 09:19
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
You cannot have a prolog without the query itself, I believe. Also, each prolog statement must be terminated by a semicolon.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On