Click here to Skip to main content
15,897,371 members
Home / Discussions / Database
   

Database

 
QuestionSQL Servier 2008 Pin
megasoft house25-Sep-11 19:33
megasoft house25-Sep-11 19:33 
AnswerRe: SQL Servier 2008 Pin
Luc Pattyn25-Sep-11 21:49
sitebuilderLuc Pattyn25-Sep-11 21:49 
QuestionDo we need to promote SP's anymore? Pin
Mehdi Gholam24-Sep-11 22:29
Mehdi Gholam24-Sep-11 22:29 
AnswerRe: Do we need to promote SP's anymore? PinPopular
Mycroft Holmes24-Sep-11 23:39
professionalMycroft Holmes24-Sep-11 23:39 
GeneralRe: Do we need to promote SP's anymore? Pin
Mehdi Gholam25-Sep-11 0:17
Mehdi Gholam25-Sep-11 0:17 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 2:12
professionalMycroft Holmes25-Sep-11 2:12 
GeneralRe: Do we need to promote SP's anymore? Pin
Mehdi Gholam25-Sep-11 9:10
Mehdi Gholam25-Sep-11 9:10 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 12:44
professionalMycroft Holmes25-Sep-11 12:44 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 6:01
mvePIEBALDconsult25-Sep-11 6:01 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 5:57
mvePIEBALDconsult25-Sep-11 5:57 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 12:43
professionalMycroft Holmes25-Sep-11 12:43 
AnswerRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 5:31
mvePIEBALDconsult25-Sep-11 5:31 
AnswerRe: Do we need to promote SP's anymore? Pin
Jörgen Andersson25-Sep-11 10:12
professionalJörgen Andersson25-Sep-11 10:12 
GeneralRe: Do we need to promote SP's anymore? Pin
_Maxxx_29-Sep-11 0:29
professional_Maxxx_29-Sep-11 0:29 
GeneralRe: Do we need to promote SP's anymore? Pin
Jörgen Andersson29-Sep-11 8:16
professionalJörgen Andersson29-Sep-11 8:16 
AnswerRe: Do we need to promote SP's anymore? Pin
Eddy Vluggen25-Sep-11 10:39
professionalEddy Vluggen25-Sep-11 10:39 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 14:20
mvePIEBALDconsult25-Sep-11 14:20 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 16:07
professionalMycroft Holmes25-Sep-11 16:07 
GeneralRe: Do we need to promote SP's anymore? Pin
Eddy Vluggen26-Sep-11 12:19
professionalEddy Vluggen26-Sep-11 12:19 
QuestionMySQL 5.2.34 CE Pin
Emejulu JVT24-Sep-11 8:34
Emejulu JVT24-Sep-11 8:34 
AnswerRe: MySQL 5.2.34 CE Pin
André Kraak24-Sep-11 8:55
André Kraak24-Sep-11 8:55 
Questiongenerating IDs with IDENTITY() in sql server 2005 Pin
Danzy8321-Sep-11 11:59
Danzy8321-Sep-11 11:59 
Hi wonderful experts, this problem has become a headache to me and so I consult you.

I need to generate IDs that are unique for records. I want the IDs to include the year in which the record is added to a table. So for instance, the first record will have an actual value of say

10001


but because i want the year to be part of the ID and where for instance the record is added in the year 2011, I will want the ID to be

201110001


The subsequent records to follow will have IDs as

201110002
201110003
201110004
201110005
.........
.........
.........


where the numbers have been stuck to the year to generate the IDs. Then during the next year which will be 2012, the first record in that year will start the count from 10001, and when stuck to the year, subsequent IDs will be

201210001
201210002
201210003
201210004
.........
.........
.........


I want all these records to be in the same table. I have been thinking of ways around this but I don't get a way of achieving this. Please help if there are ways to do this. I'm using Microsoft SQL Server 2005. Thanks.
AnswerRe: generating IDs with IDENTITY() in sql server 2005 Pin
PIEBALDconsult21-Sep-11 14:25
mvePIEBALDconsult21-Sep-11 14:25 
AnswerRe: generating IDs with IDENTITY() in sql server 2005 PinPopular
Mycroft Holmes21-Sep-11 16:09
professionalMycroft Holmes21-Sep-11 16:09 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly21-Sep-11 22:37
David Skelly21-Sep-11 22:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.