Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-21 : 09:00:33
|
DECLARE @xmlSELECT ...FROM @xml.nodes(..) t(v)this above works. But when typing the schema to the declaration, same code fails!DECLARE @xml(somexmlschema)SELECT ...FROM @xml.nodes(..) t(v)the code fails. where do I have to put the "somexmlschema" declaration in the .Nodes part to make it work? E 12°55'05.25"N 56°04'39.16" |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-21 : 09:15:22
|
| Do you get any error?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-21 : 13:28:32
|
Yes. "Cannot find node xxx...". E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-21 : 13:29:19
|
And it is not during runtime, but as early as compile time! E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-21 : 13:42:25
|
This seems to fix the compile error.DECLARE @xml(somexmlschema);WITH XMLNAMESPACES (DEFAULT 'same namespace url as defined in the schema')SELECT ...FROM @xml.nodes(..) t(v)Thank you for your attention. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|