Forum Replies Created

Viewing 14 posts - 46 through 59 (of 59 total)

  • RE: Looping though XML Subnode and pass the Identity value

    Below is the code I am trying,,,I chaged the XML file,,might be something missing in that.

    I am getting the below error

    --Create Parent Table

    CREATE TABLE [dbo].[Parent]

    (

    [Parent_ID] [int] IDENTITY(1,1) primary key clustered,

    [InternalID]...

  • RE: Looping though XML Subnode and pass the Identity value

    Hi LutzM

    I tried to do it. But i don't know its giving me error.

    Below is the XML File ,,I am dealing with.

    '<?xml version="1.0" ?>

    <Mains xmlns="http://ALD.riban.com" RedegCount="0"...

  • RE: Looping though XML Subnode and pass the Identity value

    Hey LutsM,

    It was great. I tried using temp tables and it works.

    I was jsut working on the sample file and yesterday i got some new files, Its has two lines...

  • RE: Looping though XML Subnode and pass the Identity value

    Hey LutsM,

    It was great. I tried using temp tables and it works.

    I was jsut working on the sample file and yesterday i got some new files, Its has two lines...

  • RE: Looping though XML Subnode and pass the Identity value

    Finally ,,i got it,,

    I used temp table for the Parents and passed its value to subnodes

  • RE: Looping though XML Subnode and pass the Identity value

    Can we use temp table to hold the value of Parent_ID from parent table and we can do cross apply the temp table for the subnodes to get that value??

  • RE: Looping though XML Subnode and pass the Identity value

    Hey Thaanks for your fast response.

    I am stuck in that.

    Below is the sample XML file:

    DECLARE @xml XML

    SELECT @xml=

    '<Parent InternalID="154805" Action="Update">

    <InsertUserID>ASDZXCCFG</InsertUserID>

    <InsertDateTime>08-29-2008 17:13:57</InsertDateTime>

    <UpdateUserID>SYSTEM_USER</UpdateUserID>

    <UpdateDateTime>13-05-2010 13:22:41</UpdateDateTime>

    <Childs>

    <Child InternalID="4926259" Action="Update">

    <InsertUserID>Child1</InsertUserID>

    <InsertDateTime>02-20-2008 16:27:54</InsertDateTime>

    <UpdateUserID>SYSTEM_USER</UpdateUserID>

    <UpdateDateTime>11-05-2009 15:22:44</UpdateDateTime>

    <Kids>

    <Kid InternalID="3406675" Action="Insert">

    <InsertUserID>Kid1</InsertUserID>

    <InsertDateTime>02-20-2008 16:27:54</InsertDateTime>

    <UpdateUserID>CATS</UpdateUserID>

    <UpdateDateTime>02-22-2008 12:12:43</UpdateDateTime>

    </Kid>

    <Kid...

  • RE: Looping though XML Subnode and pass the Identity value

    <Father InternalID="2030170" Action="None">

    <InsertUserID>spowell_lic</InsertUserID>

    <InsertDateTime>11-12-2010 08:14:00</InsertDateTime>

    ...

  • RE: Looping though XML Subnode and pass the Identity value

    Hey Man ,,Thanks Alot its work fine,,,

  • RE: Loading XML file with Multiple element

    --Create Parent Table

    CREATE TABLE [dbo].[Parent]

    (

    [Parent_ID] [int] IDENTITY(1,1) primary key clustered,

    [InternalID] [int] NULL,

    [Action] [nvarchar](255) NULL,

    [InsertUserID] [nvarchar](255) NULL,

    [InsertDateTime] [nvarchar](255) NULL,

    [UpdateUserID] [nvarchar](255) NULL

    )

    --Create Child Table

    CREATE TABLE [dbo].[Child]

    (

    [Child_ID] [int] IDENTITY(1,1) primary key clustered,

    [Parent_ID] int...

  • RE: Looping though XML Subnode and pass the Identity value

    Hi LutzM,

    Those InternalID is different in all nodes.So I am trying to finding a way which process as per XML file. I mean insert one row and get the identity...

  • RE: Looping though XML Subnode and pass the Identity value

    Thanks for your fast reply,,,but InternalID is defferent in all the tables.

    I am facing the difficulty into pass the identitly value of Child table to the appropriate Kid values.

  • RE: Load the data from XML file to Sql Server 2005 database

    --Create Parent Table

    CREATE TABLE [dbo].[Parent]

    (

    [Parent_ID] [int] IDENTITY(1,1) primary key clustered,

    [InternalID] [int] NULL,

    [Action] [nvarchar](255) NULL,

    [InsertUserID] [nvarchar](255) NULL,

    [InsertDateTime] [nvarchar](255) NULL,

    [UpdateUserID] [nvarchar](255) NULL

    )

    --Create Child Table

    CREATE TABLE [dbo].[Child]

    (

    [Child_ID] [int] IDENTITY(1,1) primary key clustered,

    [Parent_ID] int...

  • RE: loopin the XML Node,,,row by row process

    Hey thanks for your really fast reply,,,

    I need my request table something like that,,

    Request_ID Appointment_ID InternalID Action ...

Viewing 14 posts - 46 through 59 (of 59 total)