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
Methoun Ahmed
NA
145
101.6k
Conversion failed when converting the varchar value 'S-01'
Sep 10 2018 11:08 AM
Here is my code
Create function [dbo].[CASNo]()
returns varchar(20)
as
begin
DECLARE @lastval INT
SET @lastval = (select MAX(Cast(right(CAS_No,4) as varchar(10))) from tblCASdetails)
if @lastval is null set @lastval = 0
Return 'CAS-' + right('000' + convert(varchar(50),(@lastval + 1)),10)
end
Reply
Answers (
3
)
Hi, is there any funtion like "mssql_rows_affected" in SQL
Hi, any routine to create a TXT file after a Delete sentence