15,902,635 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 15036870 (Top 15 by date)
Member 15036870
10-Jan-21 1:42am
View
No..I didn't read Kafka.. even i am not aware of this.. To Answer Why i am generating this Sequence Code, I can say this is the requirement.
Member 15036870
10-Jan-21 1:39am
View
This is not the same post..This is the approach i have tried, and facing some issue,I have posted my code ,and need some help to make it working,I am getting wrong Output with this code.. I guess it needs a small correction, which i am seeking for.. please suggest if possible :)
Member 15036870
8-Jan-21 10:07am
View
Thanks @CHILL60 for all efforts you put to explaining me..I got the way.
Member 15036870
6-Jan-21 11:25am
View
@CHill60 I agree that the function will not update, I meant that My function is generating the value,which i am able to update in the table in the same way as you have suggested here.. my concern is for multiple ID's, that how can we pass Multiple ID's having status='A' and Sequence_Code IS NULL, one by one to the function,So it keep on generating the value and update statement will update it.
Member 15036870
6-Jan-21 7:10am
View
Thanks @Maciej Los, As suggested by you SubString(Sequence_Code,3,4) was my mistake, that i have corrected,and it started working.. Thanks You so much for all your efforts.
Member 15036870
6-Jan-21 3:35am
View
I am new to SQL,Not as good as you are in debugging..Anyway Thanks for all your suggestion, I will definitely explore debugging link,which you have shared..when i will have enough time.
Member 15036870
6-Jan-21 2:48am
View
I couldn't identify the issue,Whether the issue is with my function or the way i am supplying the input
Member 15036870
6-Jan-21 2:24am
View
Deleted
Hi @Maciej Los, i have posted one more Query,
https://www.codeproject.com/Questions/5291418/How-can-we-pass-varchar-input-to-a-SQL-function
Please have a look at the issue,and if possible please suggest me the solution.As No one is geting any solution for that issue.
Member 15036870
6-Jan-21 2:20am
View
@Maciej Los, Any Suggestion/Solution for this?
Member 15036870
6-Jan-21 2:01am
View
I understand.. that's why i have just posetd the function also,please have a look.. and if possible please suggest,i tried alot,but couldn't find any solution for this..
Member 15036870
6-Jan-21 2:00am
View
This is the function
Member 15036870
6-Jan-21 1:59am
View
CREATE FUNCTION [dbo].[GetNextSequenceCode_TEST] (@LastSeqAlphabet varchar(100))
RETURNS varchar(100)
AS
BEGIN
DECLARE @fPart varchar(100), @lChar CHAR(1);
IF(@LastSeqAlphabet IS NULL OR @LastSeqAlphabet = '')
RETURN 'A';
SELECT @fPart = LEFT(@LastSeqAlphabet, LEN(@LastSeqAlphabet) - 1);
SELECT @lChar = RIGHT(@LastSeqAlphabet, 1);
IF(@lChar = 'Z')
RETURN (SELECT [dbo].[GetNextSequenceCode_TEST](@fPart)) + 'A';
RETURN @fPart + CHAR(ASCII(@lChar)+1);
END
Member 15036870
5-Jan-21 10:01am
View
Thank you so much.. It's working. :)
Member 15036870
5-Jan-21 9:59am
View
Deleted
Thank you so much..it's working.. :)
Member 15036870
4-Jan-21 8:43am
View
@MaciejLos I appriciate the response.. This code will generate Sequence_Code,for entire table(From first Row to Last Row). But My Requirement is a bit different, I already have this Sequence_Code in the table,Now If a new row comes with Status 'A',we need to Generate Next Sequence_Code for that row.
Show More