I'm getting xml in SQL Server, and I need to get businessDate
value
I tried this
Select C.value('(businessDate)[1]', 'DATETIME') AS
FROM @input.nodes('/MealsUsed/*') AS T(C)
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MealsUsed businessDate="10/09/2013" count="10" institutionID="Test">
<MealUsed>
<TransactionDate>02/05/2013 08:10:06</TransactionDate>
<LocationID>8</LocationID>
<Swipes>1</Swipes>
</MealUsed>
<MealUsed>