|
Home > Archive > MS SQL XML > September 2005 > What ist the logical AND-relation (conjunction) of OPENXML???
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
What ist the logical AND-relation (conjunction) of OPENXML???
|
|
| nullstring 2005-09-15, 7:24 am |
| I only can find a Or-relation (disjunction) in the OpenXML-function,
it's the pipe '|'.
But how can I use the logical AND???? The '&' doesn't work!!
An example for my OR:
SELECT *
FROM OPENXML (@i, '/Mitglieder/Mitglied[@Id="1"] |
/Mitglieder/Mitglied[@Id="2"]',2)
WITH (Stadt varchar(80),
Vorname varchar(48)
)
greez....
| |
| Michael Rys [MSFT] 2005-09-20, 8:24 pm |
| | is not a logical or, but a union. XPath does not have intersection
directly, but you could write it in the predicate using and:
SELECT *
FROM OPENXML (@i, '/Mitglieder/Mitglied[@Id="1" or @Id="2"]',2)
WITH (Stadt varchar(80),
Vorname varchar(48)
)
and:
SELECT *
FROM OPENXML (@i, '/Mitglieder/Mitglied[@Id="1" and @zip="8000"]',2)
WITH (Stadt varchar(80),
Vorname varchar(48)
)
Best regards
Michael
"nullstring" <johannes.veit@datapec.de> wrote in message
news:1126779172.566489.63430@o13g2000cwo.googlegroups.com...
>I only can find a Or-relation (disjunction) in the OpenXML-function,
> it's the pipe '|'.
> But how can I use the logical AND???? The '&' doesn't work!!
>
> An example for my OR:
>
> SELECT *
> FROM OPENXML (@i, '/Mitglieder/Mitglied[@Id="1"] |
> /Mitglieder/Mitglied[@Id="2"]',2)
> WITH (Stadt varchar(80),
> Vorname varchar(48)
> )
>
>
> greez....
>
|
|
|
|
|