Blog
A better solution will have a separate table so you can generate Invoice numbers. This way you let IDENTITY field work for you with any Insert as shown in the below Stored Procedure.
Microsoft changed the Identity behavior to jump in increment of 1000 or 10000 whenever the SQL Server 2012 restart. For example: we have a Primary Key that was 10012, if you re-start the SQL server instant, then in the next Insert record you will get the Primary Key as 11012.
Running any program and dealing with the UAC could be a hassle and that process also evaluates if the user has the rights to proceed with the program any further. If you need to remove the below UAC and save you the additional click then follow some basic steps to accomplish just that.
We are experts at SQL Server database administration, performance tuning and database optimization to maximize your company's productivity. In our team we have MS SQL MVP consultant and our highest experience person has 26 years of database solutions. We are located in central NJ and provide MS SQL consulting solutions all over the USA.
Why do you need Remote DBA or Database Administrator for your company? A Microsoft SQL remote Database Administrator service is one that answers the call for all your database administration needs.
When developing solutions that require querying large amount of data, you may want to consider user Stored Procedures. When accessing multiple "query patterns", you want to program your system to use the most efficient algorithm to return your data to the user. While using dynamic SQL may work for small databases, a preferred method would be to use a Stored Procedure to optimize performance.
Attempting to improve search performance when querying on multiple fields (such as First Name, Last Name, Address, City and State) can sometimes could be a bit tricky. Performance improvements can be achieved by splitting the address into separate Street Number and Street Name fields.
In MS SQL 2005 and later editions, a much better way has been provided to remove duplicate records smartly, while having full control of which records to remove. It can be accomplished by using the ROW_NUMBER() which will return a number of row within a partition of a result set.