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 |
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
Which tcp/ip port does sql server run?
What is %rowtype in pl sql?
wirte a query to remove null? following table are col1 col2 col3 dinesh null null null suresh null null null prakesh i want the output like col1 col2 col3 dinesh suresh prkaesh
i have a table with fields(id,name,accnt_type)and in account type are FD,SAVING,RD. Write a query to get How many number of People are in each type of Account?
<<labele>> declare a=10 b=20, begin some statements declare a=30 c=40 end; what is the A value in nested block?
what are the disadvantages of mysql? : Sql dba
What is a record in pl/sql?
if we give update table_name set column_name= default. what will happen?
Write the command to remove all players named sachin from the players table.
Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not having fixed count in between of string. I want the output to have string with one dot between. I.e. A.B.C.D.E.F
Why we use joins in sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)