סינון לפי שדה XML
יש לי שדה במסד הנתונים
<Properties>
<Field Name="State" Type="System.String" />
<Field Name="Country" Type="System.String">48413</Field>
<Field Name="City" Type="System.String">asdf</Field>
<Field Name="Phone" Type="System.String">1978</Field>
<Field Name="Postcode" Type="System.String" />
<Field Name="Gender" Type="System.String">1</Field>
<Field Name="FirstName" Type="System.String">גאולה</Field>
<Field Name="Address" Type="System.String">asf</Field>
<Field Name="IsClubMember" Type="System.String">1</Field>
<Field Name="Birthdate" Type="System.String">1901-2-3</Field>
<Field Name="Zipcode" Type="System.String" />
<Field Name="LastName" Type="System.String">שושן</Field>
</Properties>
ואני רוצה לסנן לפי Birthdate
<Field Name="Birthdate" Type="System.String">1901-2-3</Field>
מתאריך עד תאריך
העניין הוא שאפשר לבצע סינון כך
SELECT Properties.value('(/Properties/Field)[1]', 'nvarchar(30)')
FROM dbo.mantis_sys_UserProfile
אבל אני צריכה להתייחס לNAME, רעיונות??
יש לי שדה במסד הנתונים
<Properties>
<Field Name="State" Type="System.String" />
<Field Name="Country" Type="System.String">48413</Field>
<Field Name="City" Type="System.String">asdf</Field>
<Field Name="Phone" Type="System.String">1978</Field>
<Field Name="Postcode" Type="System.String" />
<Field Name="Gender" Type="System.String">1</Field>
<Field Name="FirstName" Type="System.String">גאולה</Field>
<Field Name="Address" Type="System.String">asf</Field>
<Field Name="IsClubMember" Type="System.String">1</Field>
<Field Name="Birthdate" Type="System.String">1901-2-3</Field>
<Field Name="Zipcode" Type="System.String" />
<Field Name="LastName" Type="System.String">שושן</Field>
</Properties>
ואני רוצה לסנן לפי Birthdate
<Field Name="Birthdate" Type="System.String">1901-2-3</Field>
מתאריך עד תאריך
העניין הוא שאפשר לבצע סינון כך
SELECT Properties.value('(/Properties/Field)[1]', 'nvarchar(30)')
FROM dbo.mantis_sys_UserProfile
אבל אני צריכה להתייחס לNAME, רעיונות??