Forum Replies Created

Viewing 5 posts - 136 through 140 (of 140 total)

  • RE: Database Design Question/Help....

    I also echo the comments being made on this thread. Unless you have good reason to split out the database, you really shouldn't be....

    I had to help support/develop a commercial...

  • RE: inserting the xml elements into existing table

    No Problem. thanks for the feedback.

  • RE: extract data out of XML with two namespaces

    Here is a slightly revised query that should work with the example xml:

    WITH XMLNAMESPACES(

    'http://informationsystems/schema/messages' as s,

    'http://controlsystems/schema/Events' as m,

    default 'http://informationsystems/schema/messages'

    )

    SELECT

    x.value('(TrainCycleID)[1]','int') AS TrainCycleID,

    x.value('(Job)[1]','int') AS JobID,

    x.value('(s:UnloadingEvent/m:Events/m:LogixEvent/m:DateAndTime)[1]','varchar(max)') AS EventDateAndTimeZulu,

    x.value('(s:UnloadingEvent/m:Events/m:LogixEvent/m:UnloadingEvent/m:UnloadingOperatorAction/m:StartTrain/m:DumpStation)[1]','varchar(max)') AS Dumpstation,

    x.value('(s:UnloadingEvent/m:Events/m:LogixEvent/m:UnloadingEvent/m:UnloadingOperatorAction/m:StartTrain/m:Destination)[1]','varchar(max)') AS Destination

    FROM...

  • RE: image to xml and xmlns="urn:" issue

    You can get the namespace by adding this with clause just before the query:

    e.g.

    with xmlnamespaces (default 'urn:reviewset-1.0')

    select .....

    Not sure why you are having problems with the image not coming through....

  • RE: inserting the xml elements into existing table

    This is one way to shred the example xml into the format ready for you to insert into a table:

    select c.value('../../name[1]', 'varchar(100)'),

    c.value('artno[1]', 'varchar(100)'),

    c.value('description[1]', 'varchar(100)'),

    c.value('price[1]', 'money')

    from @x.nodes('//article') t(c)

    Hope this gets you...

Viewing 5 posts - 136 through 140 (of 140 total)