SQLクエリでは、これらのコマンドを実行し、何を試してもNUllを取得し続けます。
DECLARE @x AS XML
SET @x = ' <Data> <Preference>Mail</Preference> <Comment>Changed Contact Communication Preference due to customer unsubscribed</Comment> </Data> '
SELECT @x.value('(//Data/@Preference)[0]','varchar(20)') AS Preference
私は何が間違っているのですか?