Answered How to use Max function in DBCC CHECKIDENT

  • Friday, August 22, 2008 12:02 PM
     
      Has Code
     In MSDN I found an example for forcing to chnage in current identity value

    Example:
    USE AdventureWorks;
    GO
    DBCC CHECKIDENT ("HumanResources.Employee", RESEED, 30);
    GO


    How to use max function in  DBCC Statment

    LiKE DBCC CHECKIDENT ("HumanResources.Employee", RESEED, SELECT MAX(COLUM1) FROMHumanResources.Employee );

    Since employee  table in two different server  whcih  has two way replication that is why  we neee max valud that particulare column while reseeding

    Plz provide solution


    .Net Developer

All Replies

  • Friday, August 22, 2008 2:43 PM
    Moderator
     
     Answered
     Hi, this forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx. Since your post does not appear to be related to the Open Protocol Specification documentation set we would appreciate it if you could try SQL Server : http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=19&SiteID=1 instead to find the information you are looking for. Thanks!
    Thanks!
    John Dunning
    Escalation Engineer Microsoft Corporation
    US-CSS DSC PROTOCOL TEAM
  • Sunday, February 20, 2011 11:59 PM
     
     
    Hi, this forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx. Since your post does not appear to be related to the Open Protocol Specification documentation set we would appreciate it if you could try SQL Server : http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=19&SiteID=1 instead to find the information you are looking for. Thanks!
    Thanks!
    John Dunning
    Escalation Engineer Microsoft Corporation
    US-CSS DSC PROTOCOL TEAM

    Your effort is appreciated! I learned a lot from your answer.