for anyone interested this is the approach I took ( @xml_path nvarchar(255), @xml_file_name nvarchar(50) )AS DECLARE @xml_table TABLE(xml_data xml)DECLARE @xmlDoc NVARCHAR(MAX), @handle INT, @sqlstmt NVARCHAR(MAX)SET @sqlstmt= 'SELECT * FROM OPENROWSET ( BULK ''' + @xml_path + @xml_file_name + ''', SINGLE_CLOB ) AS XMLDATA'INSERT INTO @xml_table EXEC (@sqlstmt)SELECT @xmlDoc = CONVERT(NVARCHAR(max), xml_data ) FROM @xml_tableEXEC sp_xml_preparedocument @handle OUTPUT, @xmlDoc
If you don't have the passion to help people, you have no passion