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
habib ullah
NA
229
14.2k
how to increase the values of varchar colum
Apr 12 2018 12:04 AM
how to increase the value of varchar columns and assing the specific pattern
code is the cannot the increment
my store procedure is that
ALTER PROCEDURE [School].[GetRegisterationNumber]
AS
begin
declare @StudentRegNo nvarchar(50)
set @StudentRegNo=(select MAX(StudentRegNo)from School.StudentInformation)
if @StudentRegNo is null
begin
set @StudentRegNo='OXPS-0001'
select @StudentRegNo
end
else
begin
select 'OXPS'+'-'+RIGHT('0000'+ convert(varchar(10),@StudentRegNo),4)
--set @StudentRegNo=SCOPE_IDENTITY()
end
end
Reply
Answers (
5
)
How do I select data for period of time ?
How create external table in database using SQL server?