i have xml source. xml source having lacks of records. i
want extract/retrive xml source data using sql query.
please tell me how to write query.
Answer Posted / jagadeesh
create procedure proc_es
as
begin
declare @hdoc int
DECLARE @xml xml
set @xml=(select *
From openrowset(Bulk'C:\emp18.xml', single_blob) as xmldata)
exec sp_xml_preparedocument @hdoc output,@xml
insert into emp19(emp_id,emp_fname,emp_lname,emp_mail)
select *
from openxml(@hdoc,'/employee/details',3)
with(emp_id int,emp_firstname varchar(50),emp_lastname varchar(50),emp_mailid varchar(50))
exec sp_xml_removedocument @hdoc
end
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
When is the update_statistics command used?
What is oracle sql developer?
What is sqlcommand?
What are the uses of merge?
What are different types of keys?
how to use 'mysql' to run sql statements? : Sql dba
What is pl/sql table? Why is it used?
What will you get by the cursor attribute sql%notfound?
What is the use of pl/sql table?
What are keys in sql?
What is record in pl sql?
How to make a copy values from one column to another in sql?
What happens when a trigger is associated to a view?
What are all the different types of indexes?
What is pl/sql table? Why it is used?