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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / mathivanan
select extractvalue(columnname,'/roottag/subtag') from tablename
Is This Answer Correct ? | 0 Yes | 0 No |
what are the advantages of mysql in comparison to oracle? : Sql dba
What is an inner join sql?
what is cross join? : Sql dba
Write the command to remove all players named sachin from the players table.
What is use of term?
Is it possible to create startup or shutdown trigger for on-schema?
How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". It consists of multiple columns. Then if we insert rows into this table with duplicate records then how can we retrieve only duplicate records from that table?
28 Answers Alps, Aricent, Bank Of America, Wipro,
what is single byte over head in oracle..?
Which query operators in sql is used for pattern matching?
what is a database transaction? : Sql dba
Explain the savepoint statement.
Which sql statement is used to return only different values?