help for get max column when store with xml

  • Hello Friend

    I can not speak good English

    sorry

    i want for store data in database of c#

    1-I have an xml string in c#

    2-I sent the following procedure

    3-And without any problems.

    4-store in table.

    5-My problem is:

    I need to get the greatest column value from table

    I added it to 1 and I recorded the new record

    ALTER PROCEDURE [dbo].[SpTest]

    @Xml xml

    AS

    BEGIN

    DECLARE @ih INT

    EXEC sp_XML_preparedocument @ih output, @Xml

    INSERT TableName

    SELECT *

    FROM OPENXML(@ih, 'TBL_FACTOR/RD_FACTOR')

    WITH TableName

    EXEC sp_XML_removedocument @ih

  • No one knows the answer

  • It isn't that no one knows the answer, it may be that no one really knows the question. There really isn't enough in your original post to really help.

    Please read the first article I have referenced below in my signature block. it will walk you through everything you need to post and how to post it to get the best answers in return.

  • It would help if you included a CREATE TABLE statement for your table, as well as sample XML document. And from that example you could explain a little more closely what you want to achieve.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply