Reset the value of the SQL Server identity column according to what is being inserted

I have a SQL Server 2008 database with a table that has a field ID that has an increment and seeds of 1.

This great work that each new record created automatically gets a number of new and distinct.

Now when I insert some new records that I need to be able to make this value from 10001 and then next would be 10002 etc.

But it's only for certain insertions.

Is there a way to control the identity seed and increment, perhaps on the fly via a query?

If some inserts would follow 1,2,3,4,5,6,7 according to what is being inserted

and others would follow 10001,10002,10003 according to what is being inserted.

is this possible?

Make a different field.  Don't mess with your PK.

Make sure you have a plan for when you get 10000 records in this table.

Tags: ColdFusion

Similar Questions

  • Error code 64 c for update of security for the SQL Server 2005 Service Pack 3 (KB2494113)

    Have tried to install KB2494113 - update of safety and he constantly fails to install. Help please as I know very little about the "intricacies" of my laptop

    Hi Phillipmuir,

    Step 1:

    You can read the following article and try to reset the Windows Update components and check.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Step 2:

    You can also check the following link and try to download and install the standalone update package:

    Update of security for the SQL Server 2005 Service Pack 3 (KB2494113)

    Hope this information is useful.

  • VIX file in the user interface designer receives the data from the Web service application that communicates with the SQL server database

    I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.

    This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.

    Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?

    There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")

    Please help me ASAP!

    Thank you

    Ivan

    I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.

    It's important to create the system DSN if you want your VI of web service to communicate with the database.

    PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.

  • create the SQL server programmatially data source

    Hello

    I would like to create a SQL server by programming in LabVIEW data source. The SQL server version that I used is from 2005. Can someone give some ideas? An example of code will be more favorable.

    Thank you

    Jane

    You can build the connection string you even.  The open function in the Toolbox of data base accepts a string as well (it's polymorphic) who can be the connection string.  This is the site I use to understand.  Is the most common things.  You may need to search Google more specific elements.

    http://www.ConnectionStrings.com/

    If you want to use the other option, someone has achieved a UDL editor in LabVIEW.  You can use this code to create your own UDL which can use the Open DB function:

    https://decibel.NI.com/content/docs/doc-18613

    I have used the above code, so can't comment on that.

  • How to completely remove the SQL Server 2008 R2 from my system?

    I got the SQL Server loaded on my computer before I realized it was the express edition that I needed. When I tried to load the version I needed the computer said that I had to create a new instance for the second version to run simultaneously. (had already uninstalled the original SQL Server and did not not the problem.) I went through the steps again and somehow there is the menu server must remove files, but they can access it. The only solution I see at the moment is to reload the server and uninstall and I hope that everything that caused its not completely withdraw from my system is corrected. Please tell me there is another solution which has guaranteed results.

    Hi Avendia,

    Your question would be better asked on the SQL Server forum

    SQL Server Forum
    http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer

  • Windows Update - a security update to the SQL Server 2005 Service Pack 3 (KB970892)

    How to install Windows Update security for the SQL Server 2005 Service Pack 3 (KB970892) when he continually fails to install.

    Provide as much information as possible and try this forum.

    The SQL Server installation & set program at level
    http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services

  • "Security for the SQL Server 2005 Service Pack 3 (KB970892) update" fails. I get "error Code: 0 x 737»

    Have tried several times the update. Same results.  Running Windows XP

    You can either search or post in the following newsgroup.
    The SQL Server installation & set program at level
    http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services

  • Update of security for the SQL Server 2005 Service Pack 3 (KB970892) refuses to download. The error message I get is error Code 0 X 7358.

    This update is required?  And why it has not been downloaded when I bought the PC?  It is now only a few months old.

    Try this other forum:

    The SQL Server installation & set program at level
    http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services

  • Update of security for the SQL Server 2005 Service Pack 3 (KB970892) does not load.

    Someone at - he found a way to load it correctly?

    Hello

    Welcome to the Microsoft Vista answers Forum!

    Try the steps below and check if the problem is resolved,

    Download the stand-alone package of "A security update to the SQL Server 2005 Service Pack 3 (KB970892)" from the link:

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=0d878f4b-71e8-4170-9a14-1bce684811ce&displaylang=en

    Now you must install the update in safe mode.

    Restart the computer using safe and then by running the Setup program

    The next step to install the program in safe mode is to restart your computer in safe mode, and then run Setup from the hard drive. To do this, follow these steps:

    1.

    To start Windows in safe mode, follow these steps:

    one.

    Click Start and then click on stop.

    b.

    Click on restart the computer and then click OK.

    c.

    To enter the safe mode of Windows Vista, the computer starts to press on and hold your "F8 key" which should show "Windows Advanced Options Menu" as shown below. Use your key to move to "Safe Mode" and press your enter key.

    d.

    When Windows starts in safe mode, click OK.

    Now try to install the update and check for the issue.

    If the above provided steps fail, then you need to visit the link provided to connect with the following technet forum:

    http://social.technet.Microsoft.com/forums/en-us/categories/

    Hope this information is useful.

    Thank you, and in what concerns:

    Suresh Kumar-Microsoft Support.

    Visit our http://social.answers.microsoft.com/Forums/en-US/answersfeedback/threads/ Microsoft answers feedback Forum and let us know what you think.

  • The SQL server system configuration checker cannot be executed due to WMI configuration on the computer

    The SQL server system configuration checker cannot be executed due to WMI configuration on the computer

     
    Toshiba-User Error: 2147749896 (0 x 80041008)
     
    I am trying to load the software for insurance. I got the above message.

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.


    The SQL Server installation & set program to update Forum

    http://social.msdn.Microsoft.com/forums/en/sqlsetupandupgrade/thread/3f313abe-8826-4d76-8F04-611ebd4d0141

  • Update of security for the SQL Server 2005 Service Pack 3 (KB970892) constantly moved, what can I do about it?

    Update of security for the SQL Server 2005 Service Pack 3 (KB970892) constantly moved, what can I do about it?

    The update tried to automatically install dozens of times, but it keeps failing, is there something I can fix which will allow this facility. I have reasonable computer skills but I'm not good at that, I need step by step help and a full explanation of acronyms.

    Hi Laurence,.

    The issue of Windows is more complex than what is generally answered in the Microsoft Community Forums. Appropriate in the TechNet Forums. Please post your question in the TechNet Forums.

    You can check the link to post your question:

    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer

    I hope that helps!

  • Encrypt the connection to the SQL Server

    I have a new installation of OpenManage Essentials 2.1 and have a quick question. Our database of MOE is hosted on a remote SQL Server cluster. Is it possible to configure the database connection to use encryption/SSL when connecting to the cluster? We need it for compliance with our security policy, but unfortunately the installation that the user interface does not expose this option.

    If not is it possible to manually change the connection string?

    Note that this is in that concerning the encryption of the SQL Server connection between HOME servers and database, not HTTPS.

    Thank you
    Andrew

    Hi André,.

    OME encrypts all sensitive information before it is transferred to SQL Server.

    Also, the connection to SQL Server used by OME information is encrypted and there is no option for a user to change this.

    I hope this helps.

    Thank you
    Vijay.

  • access the sql server database in my widget

    I just started to build widgets for blackberry in visual studio 2008 and I want to know if its possible to use data from the sql Server database server in my widget and how can I do?

    You can consume data in a WebWorks app server-side.  One way to do this is to build a Web Service that, when it is called from your application, queries the database and returns a list of results (for example in XML or JSON format).

    You already have the data in your available through Web Services SQL Server database?

    Another way is to produce a web page server that displays the data from your SQL Server database and load this web page from your application WebWorks.

  • Use of the SQL Server Agent

    Hello

    Lack of VMWare VirtualCenter Server 2.5.0.64207 on a Windows 2003 R2 SP2, SQL Server 2005 System. It is the only significant application on the system, and VirtualCenterDB is the only database.

    We see that the system is running very slowly, both regarding the response time in the Console of the Infrastructure of VMWare and the response time for all other programs that you happen to run. For example, the MMC administration tools take a long time to start or respond to clicks.

    PerfMon shows fairly low CPU usage, but the queue of average drive about 170.

    However, the problem disappears if we stop the SQL Server Agent service. The average disk queue goes down to about 2.

    I don't want to always leave the SQL Server Agent is turned off, because it is necessary to perform periodic maintenance. Is there a way to tell why the readers of SQL Server Agent use so much disk space?  Given that VirtualCenterDB is our unique database, I suspect that the problem is specific to VMWare.

    Thanks in advance for your suggestions.

    These jobs move data from system of VPX_HIST_STAT1 to VPX_HIST_STAT2 then VPX_HIST_STAT3 then VPX_HIST_STAT4 and finally remove the data from your database.   These tables to the expectations of the performance data for your hosts and virtual machines and jobs here correspond to the data of the basic performance levels than your game in the VI client when connected to your vCenter server.  It is important to keep these tasks to make sure that your weekly, monthly and annual data are properly maintained.

    You have a database maintenance task that rebuilt the index?  If this isn't the case, then it is perhaps probably caused performance issues.  Without up-to-date indexes, SQL Server will be compelled to resort to analysis of tables when looking for data that can significantly increase the disk i/o.

  • Installation of the SQL Server Agent on the Virtual Center Server

    Hello everyone

    I installed VC2.5 on a PowerEdge 1950 server.  The SQL VC database will reside on a different server, of course, I understand that you need to create a system DSN.  But he also stated that the "SQL Server Agent" must run on the VC server.  How to install SQL Server agent?  It is installed from the SQL installation CD?

    Thank you!!!

    SQL Agent is part of the SQL Server installation and only would be located on the database server.

Maybe you are looking for