• Sean Lange (6/5/2012)


    IgorMi (6/5/2012)


    Hi,

    It is like the other inserts.

    Example

    The table:

    CREATE TABLE [dbo].[UrlSet](

    [Tip] [smallint] NOT NULL,

    [xml] NULL

    )

    The insert:

    Insert Into UrlSet(Tip,url)

    Values (1,'<Urls NavigationGroup="1">

    <Item ItemUrl="~/About.aspx" />

    </Urls>')

    I don't know what your other inserts look like.

    Does this do what you want?

    declare @xml xml = '<?xml version="1.0" encoding="UTF-8"?>

    <sessions accountId=''48152'' startDate=''2012-05-27'' startTime=''00:00:00'' endDate=''2012-05-28'' endTime=''00:00:00''>

    <session applicationId=''357627'' applicationName=''app1'' startTime=''00:48:54'' startDate=''2012-05-27'' type=''abc'' direction=''outbound'' durationMinutes=''0.43'' token=''113ddd5999257543963a760789fc12344f27cb0bcc519f0ce6d3a907fccb0d56361c4e3151c3780c35c752cb'' bridged=''false'' callerId=''1234567890'' sessionId=''86c368af24d7eab2a84ec6660704f3d4'' connectionId=''0''>

    <outboundDialString dialString=''11234567890''/>

    </session>

    <session applicationId=''112549'' applicationName=''app2'' startTime=''01:14:33'' startDate=''2012-05-27'' type=''abc'' direction=''inbound'' durationMinutes=''2.73'' calledId=''1234567890'' bridged=''false'' callerId=''1234567890'' sessionId=''7d35636be123418f93fe638a9bac78d9'' connectionId=''0''/>

    <session applicationId=''357627'' applicationName=''app3'' startTime=''00:48:54'' startDate=''2012-05-27'' type=''abc'' direction=''outbound'' durationMinutes=''0.43'' token=''113ddd5999257543963a760789fc12344f27cb0bcc519f0ce6d3a907fccb0d56361c4e3151c3780c35c752cb'' bridged=''false'' callerId=''1234567890'' sessionId=''86c368af24d7eab2a84ec6660704f3d4'' connectionId=''0''>

    <outboundDialString dialString=''11234567890''/>

    </session>

    <session applicationId=''357627'' applicationName=''app4'' startTime=''00:48:54'' startDate=''2012-05-27'' type=''abc'' direction=''outbound'' durationMinutes=''0.43'' token=''113ddd5999257543963a760789fc12344f27cb0bcc519f0ce6d3a907fccb0d56361c4e3151c3780c35c752cb'' bridged=''false'' callerId=''1234567890'' sessionId=''86c368af24d7eab2a84ec6660704f3d4'' connectionId=''0''>

    <outboundDialString dialString=''11234567890''/>

    </session>

    <session applicationId=''357627'' applicationName=''app5'' startTime=''00:48:54'' startDate=''2012-05-27'' type=''abc'' direction=''outbound'' durationMinutes=''0.43'' token=''113ddd5999257543963a760789fc12344f27cb0bcc519f0ce6d3a907fccb0d56361c4e3151c3780c35c752cb'' bridged=''false'' callerId=''1234567890'' sessionId=''86c368af24d7eab2a84ec6660704f3d4'' connectionId=''0''>

    <outboundDialString dialString=''11234567890''/>

    </session>

    <session applicationId=''357627'' applicationName=''app6'' startTime=''00:48:54'' startDate=''2012-05-27'' type=''abc'' direction=''outbound'' durationMinutes=''0.43'' token=''113ddd5999257543963a760789fc12344f27cb0bcc519f0ce6d3a907fccb0d56361c4e3151c3780c35c752cb'' bridged=''false'' callerId=''1234567890'' sessionId=''86c368af24d7eab2a84ec6660704f3d4'' connectionId=''0''>

    <outboundDialString dialString=''11234567890''/>

    </session>

    </sessions>'

    CREATE TABLE #UrlSet(

    [Tip] [smallint] NOT NULL,

    [xml] NULL

    )

    insert #UrlSet select 1, @xml

    select * from #UrlSet

    Yes of course,

    I just didn't want to give the primer with your quite big xml

    Thanks

    IgorMi

    Igor Micev,My blog: www.igormicev.com