473,513 Members | 8,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSSQL/Related to XML Query

2 New Member
Hi All,

I am writinng following query.


select distinct 1 as tag,
null as parent,
OriginAirportCode as [Origin!1!id],

null as [DestinationAirportCode!2!id!idref],

null as [DestinationAirportCode!2!ConnectingAirportCode!idr ef],

null as [DestinationAirportCode!2!IsFutureFlight!idref] from RouteMap

union all
select distinct 2 as tag, 1 as parent,

OriginAirportCode as [Origin!1!id],

DestinationAirportCode as [DestinationAirportCode!2!id!idref],

isnull(ConnectingAirportCode, 'NULL ') as [DestinationAirportCode!2!ConnectingAirportCode!idr ef],

IsFutureFlight as [DestinationAirportCode!2!IsFutureFlight!idref]

from RouteMap

order by [Origin!1!id],[DestinationAirportCode!2!id!idref],

[DestinationAirportCode!2!ConnectingAirportCode!idr ef],

[DestinationAirportCode!2!IsFutureFlight!idref] for xml explicit

Its giving me XML results but ialso Breaking a node .I think this is due to character limit.
Please suggest me to ovewrcome this problem.


<RouteMap>
<XML_F52E2B61-18A1-11d1-B105-00805F49916B><Origin id="AMM"><Destination id="AUH" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="BKK" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="BOM" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="DAM" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="ISB" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MCT" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MNL" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="YYZ" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin><Origin id="AUH"><Destination id="AMM" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="BKK" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="BOM" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="BRU" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="CAI" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="DMM" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="DOH" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="GVA" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="ISB" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="JED" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="KHI" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="KRT" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="LHR" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MCT" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MNL" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MUC" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="OSA" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="PEW" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="YYZ" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin :confused: - <ActualMiles>
:confused: <XML_F52E2B61-18A1-11d1-B105-00805F49916B> :confused: ><Origin id="BKK"><Destination id="AMM" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="AUH" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="BOM" ConnectingAirportCode="AUH" IsFutureFlight="0"/><Destination id="DAM" ConnectingAirportCode="AUH" IsFutureFlight="0"/></Origin><Origin id="BOM"><Destination id="AUH" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="DAM" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="ISB" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MCT" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MNL" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="YYZ" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin><Origin id="DAM"><Destination id="AUH" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="BKK" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="ISB" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="MCT" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin><Origin id="ISB"><Destination id="BOM" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="DAM" ConnectingAirportCode="" IsFutureFlight="0"/></Origin><Origin id="MCT"><Destination id="AUH" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin><Origin id="MNL"><Destination id="AUH" ConnectingAirportCode="NULL " IsFutureFlight="0"/><Destination id="BKK" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin><Origin id="YYZ"><Destination id="BOM" ConnectingAirportCode="NULL " IsFutureFlight="0"/></Origin></XML_F52E2B61-18A1-11d1-B105-00805F49916B>
</RouteMap>
Jun 21 '06 #1
0 1277

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3382
by: Gordan | last post by:
Hi, I have a site written in PHP with MS SQL Server 2000 as the db backend. When the site was made there was no need for advanced banner rotation so a 10 line script was written and it served...
4
1633
by: Don | last post by:
I have MSSQL2k SP3a on WIN2k SP4. moved a Date/log files to this server about a week ago from a SQL7 server and attached it to this new Sql2k server. everything works fine for about 24hrs and...
14
2448
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
14
2904
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to...
1
2655
by: mkepick | last post by:
migrated databases from sybase to mssql, migration exported sybase written queries written with the application build in query tool and imported to mssql databases. all db and tables migrated...
0
7373
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,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5677
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,...
1
5079
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...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
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...

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.