Buy Questpond's video subscriptions on
huge discount
.
Online: 2967
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Codes
>
Loading ...
Auto Generate Alpha numeric ID in SQL server
Posted by
Kirthiga
under
Sql Server
category on
5/22/2018
|
Points: 40
| Views : 2431
Post Code
|
Search Codes
|
Code Home
Declare @table table(Name varchar(10))
insert into @table values('Ram'),('Kamal'),('Suresh'),('Vinoth'),('Surya'),('Vijay'),('Siva')
select *,concat(Name,REPLICATE('0',6-len(Name)), Format(ROW_NUMBER()over(order by Name),'000'))DocNo from @table
Alert Moderator
Bookmark It
Comments or Responses
Posted by:
Rajnilari2015
on: 5/23/2018 Level:
Platinum
| Status:
[Member]
[Microsoft_MVP]
[MVP]
|
Points: 10
this can be achieve by using
NEWID()
provided you are not looking for sequential numerics
Login to post response
Latest Code Snipptes
writing Custom pagination html code in python and django
Code snippet for setInterval
Azure Function - Connect to MS Dynamics using application user - .NET core 3.1
MS Dynamics 365- Custom action - Read input parameter values from plugin
MS Dynamics 365- Disassociate record from N-N relationship entity
Search box with icon in Navbar in bootstrap 4
Remove HTML tags using Regular Expression in C#
MS Dynamics 365- Close Quote from C# / Custom action
How to show and hide submenu in tabs using jquery
More ...