473,772 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

i want ot convert xml data format into the general data format

hi sir
i have table hh .it has two columns
one is hhno is integer datatype another hhdoc is xml data type like
hh table
hhno hhdoc
------------
---------------------------------------------------------------------------------
100
<suresh>sfjfjfj fjf</suresh>........ ............... .............
101
<ramesh>hhfhfhf </ramesh>........ ............... ...........
how to convert the xml data format into the general data format pls
help me with examples

Jun 9 '06 #1
1 1896
> how to convert the xml data format into the general data format pls
help me with examples
What do you mean by 'general format'? The following example shows one
method to return the root element text:

CREATE TABLE Table1
(
hhno int NOT NULL
CONSTRAINT PK_Table1 PRIMARY KEY,
hhdoc xml
);

INSERT INTO Table1
SELECT 100, '<suresh>sfjfjf jfjf</suresh>'
UNION ALL SELECT 101, '<ramesh>hhfhfh f</ramesh>';

SELECT hhno, hhdoc.query('*/text()')
FROM Table1;

--
Hope this helps.

Dan Guzman
SQL Server MVP

"surya" <su*******@gmai l.com> wrote in message
news:11******** **************@ c74g2000cwc.goo glegroups.com.. . hi sir
i have table hh .it has two columns
one is hhno is integer datatype another hhdoc is xml data type like
hh table
hhno hhdoc
------------
---------------------------------------------------------------------------------
100
<suresh>sfjfjfj fjf</suresh>........ ............... .............
101
<ramesh>hhfhfhf </ramesh>........ ............... ...........
how to convert the xml data format into the general data format pls
help me with examples

Jun 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8687
by: manning_news | last post by:
Using SQL 2000. I need to select rows based on a date range. Both the beginning date and ending date of the range will be entered in the mm/dd/yy format. There are 2 columns in the table called MonthOfEval and YearOfEval, both varchar(9) and both with data like "August" and "2005-2006". I think I need to use these 2 columns to create a date in the mm/dd/yy format, then use that newly created date to see if it's within the date range. ...
0
3731
by: TheCoder | last post by:
I am making a D-base with web conectivity for my class project. I have everything working but the subit button sends the data to the correct fields but afterwards it wants to reproduce new blank text boxes how do I stop this and how would I code it to redirect to a thank you page. All with out the help of a web server this has to br ran from the desktop and with in IE with a local directory. Pleas help I am stuck. here is the code! ...
5
18724
by: simon | last post by:
I have datetime variable: Datetime tsEndTime; Should I use (DateTime): tsEndTime=(DateTime)rdr.GetValue(15) or is better to use: tsEndTime=Convert.ToDateTime(rdr.GetValue(15))
7
1435
by: Mike Fellows | last post by:
Below is my code that is carried out on my dataset, datagrid etc... Im trying to get column0 "Date & Time" to show date and time, not just date ive read some stuff posted by Dmitriy Lapshin on this board that goes way over my ability (this is my first vb or vb.net project). from what I can tell i need a GridColumnStyles collection adding to my datagrid but each and everytime I try to do this my code crashes.
5
2577
by: melickas | last post by:
We designed a custom application using Office Developer Tools '97 which included a Run-time version of Access--- so it would not matter if our customer even had any version of Access on their computer. The application ran without problems on our customer's computer for 2-3 years. Then our customer bought a new computer and we had to reinstall the application. Everything was ok for approximately 6 months until our customer was "cleaning up"...
7
28039
by: anuragkhanna8 | last post by:
Hi, I am trying to convert a 16 bit rgb value to 32 bit, however the new color generated is different from the 16 bit rgb data. Please let me know the formula to convert an 16 bit rgb data to 32 bit rgb data. Thanks!!
1
1368
by: bissatch | last post by:
Hi, When might you convert a database to XML format. I have read cases where it allows you to seperate the application logic from the data logic (have i got them right?) in a more application design approach. I like this idea, but would this only apply to large projects or where you are definetely sharing content across various platforms or over the internet? I would apply this to most projects but speed performance (with the added...
4
2495
by: RP | last post by:
I am using SQL Server 2005 as backend. I have a Text Box that accepts Date in the format dd-MM-yyyy. But when I attempt to insert a record, an error is displayed: Cannot convert char to DateTime .... Actually, when the text box has entry like 22-10-2005, it considers 22 as month whereas it is DD. How to convert the Text Box value to an acceptable format. I tried: DateTime.parse(txtDOB.Text,"dd-MM-yyyy")
5
3364
by: sonu | last post by:
hey good morning ...... how to convert a video file in .flv format in php for linux hosting......is there any package whis provide this facility . Can i use ffmpeg for linux hosting project.......... plz help me.. thanks & regards Prabhat
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7461
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.