SQL FTS is good for token searches, but not really for numbers or dates the
way you are querying it.
You can't query an element's value or an attribute's value, but you can
query the child elements values.
You can't search specific element or attribute values.
However in SQL 2005 you can query XML using SQL FTS and then use an XQuery
contains to do a literal search of an element or attribute value.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com [quoted text, click to view] "mehdi_mousavi" <mehdi.mousavi@gmail.com> wrote in message
news:1125398498.123430.294360@g43g2000cwa.googlegroups.com...
> Hi,
> Consider the following xml snippet that's being kept as an image
> datatype within the Sql Server 2000 SP3 running under a W2K Advanced
> Server machine:
>
> ...Removed For Breviry...
> <Sal d2p1:Beginning="2005-07-30T14:46:24.7330000+04:30"
> d2p1:Finishing="2005-07-30T14:46:42.9230000+04:30">
> <Id d2p1:AreaCode="711">
> <PhoneNumber>8240000</PhoneNumber>
> </Id>
> ...Removed For Breviry...
>
> The question is that how can I write a contains_search_condition for a
> specific beginning date, say, 2005-07-30?
>
> 0 records are (wrongly) affected by the following sql:
>
> SELECT ID FROM mytable WHERE CONTAINS(the_xml_col, '
> "d2p1:Beginning="2005-07-30*"" ')
>
> whilst this one returns the correct results:
>
> SELECT ID FROM mytable WHERE CONTAINS(the_xml_col, '
> "d2p1:Beginning="2005-07-30T14:46:24.7330000+04:30"" ')
>
> What is going wrong? Any help would be highly appreciated,
>
> Cheers,
> Mehdi
>