Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forumguidelines
Methoun Ahmed
1.8k
145
59k
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