tag:blogger.com,1999:blog-28828308.post8725643251074194504..comments2022-10-01T10:32:06.559+05:30Comments on Beyond Relational: XQuery Lab 2 - An example using OUTER APPLYjacob.sebastianhttp://www.blogger.com/profile/16226852172321674933noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-28828308.post-23578610855343626532008-12-26T23:01:00.000+05:302008-12-26T23:01:00.000+05:30Here is an example that shows how to load the valu...Here is an example that shows how to load the value of an XML column to a variable. <BR/><BR/>I hope this will help you.<BR/><BR/>-- create a table with an XML column<BR/>DECLARE @t TABLE (data XML)<BR/><BR/>-- insert a row with an XML value<BR/>INSERT INTO @t SELECT (<BR/> SELECT <BR/> 'test' AS val <BR/> FOR XML PATH(''), ROOT('data') <BR/>)<BR/><BR/>-- DECLARE an XML variable<BR/>DECLARE @x jacob.sebastianhttps://www.blogger.com/profile/16226852172321674933noreply@blogger.comtag:blogger.com,1999:blog-28828308.post-62306816670763830092008-12-25T13:25:00.000+05:302008-12-25T13:25:00.000+05:30Can any one tell me what will be the query if I st...Can any one tell me what will be the query if I store this xml into database table (say “Pupiltable”) xml column (say “pupilcolumn”)?<BR/>I want to set @x value from database table.<BR/>I use following code for set @x value.But it dose not work.<BR/><BR/>DECLARE @x XML<BR/>SELECT @x= pupilcolumn from Pupiltable<BR/>SELECT<BR/> Pupil.value('PupilID[1]' ,'varchar(15)') as UPN,<BR/> snehahttps://www.blogger.com/profile/12358264710922224022noreply@blogger.com