You need to loop through records with content.folder_id=30 and then use OPENXML inside it to fetch the data from xml field in each record. wrap the current openxml call inside a WHILE loop and try. something likeDeclare @ResearchXml xml,@PK intDeclare @i intSELECT @PK=MIN(PK)FROM content_html WHILE @PK IS NOT NULLBEGINSelect @ResearchXml = content_html from content where content.folder_id=30 AND PK=@PKEXEC sp_xml_preparedocument @i OUTPUT, @ResearchXmlSELECT * FROM OPENXML(@i, '/root/DocInfo', 1) WITH (Title VARCHAR(250) 'Title',PrimarySubjectArea VARCHAR(250) 'PrimarySubjectArea',Author VARCHAR(250) 'Author')...SELECT @PK=MIN(PK)FROM content_html WHERE PK >@PKEND
here PK is the primary key of your content_html table