Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

help for get max column when store with xml Expand / Collapse
Author
Message
Posted Wednesday, August 28, 2013 3:39 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 2, 2014 11:05 PM
Points: 18, Visits: 33
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
Post #1489437
Posted Saturday, August 31, 2013 10:28 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 2, 2014 11:05 PM
Points: 18, Visits: 33
No one knows the answer
Post #1490402
Posted Saturday, August 31, 2013 11:56 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:45 PM
Points: 23,081, Visits: 31,620
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.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1490411
Posted Saturday, August 31, 2013 4:20 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 2:28 PM
Points: 786, Visits: 691
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.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1490429
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse