TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vijay krish
NA
13
27.4k
I have a problem with identity column
Nov 16 2012 8:28 AM
i have a problem with identity column...i have two columns reg_series ans reg_number...i have set reg_series with current system date...and i have to get increment in reg_number based on reg_series...output shud be like this
reg_series reg_number
20121116 1
20121116 2
20121116 3
20121116 4
20121117 1
20121117 2
20121117 3
declare @date varchar(50)
set @date=convert(varchar(50),GETDATE(),112)
insert into data(Reg_Series) values(@date)
i have set reg_series with current system date...reg_number shud be auto generated based on reg_series value
Reply
Answers (
1
)
What are primary keys and foreign keys
How does a stored procedure return values