15,793,609 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 Python questions
View PHP 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 15090354 (Top 7 by date)
Member 15090354
11-Aug-23 4:00am
View
The dates are sample data but in database utc format only
Member 15090354
25-Jul-23 5:58am
View
There is a requirement that i need to one more ui screen with js and css html with exsitng anguarjs flow
Member 15090354
22-Dec-22 13:43pm
View
How to convert from sql qery to linq
Select * from Employee emp where empId
in (select pId from EmpRelationShip where childId in (select pid from Employee emp1
Join EmpRelationShip emprs on emprs.cId= emp1.ahid
Where empObjectId in (select agencyobjectId from Employee
Where empid=384)
))
Member 15090354
17-Sep-22 12:31pm
View
Hi actually old application depend only on xml only
Member 15090354
10-Sep-22 10:24am
View
Hi Thanks for your response already i have data for individual child levels that i want to add to the individual parent levels which is maching at child level record
like below
-Paret parent level fields -Child info Childlevel fields -SubChild Info Sublevel info
Member 15090354
9-Sep-22 16:14pm
View
Hi The primary key and foreign key relation as already there in db level i am getting multiple table results just i want add child list at parent level list object
Member 15090354
14-Mar-22 2:49am
View
Hi Maciej Los
I have tried with the below CTE
CREATE FUNCTION dbo.[UDF_Remove_Duplicate_EntryNew]
(
@Duplicate_Word VARCHAR(MAX)
)
RETURNS VARCHAR(MAX)
BEGIN
DECLARE @Xml XML
DECLARE @Removed_Duplicate_Word VARCHAR(MAX)
DECLARE @ReplaceInput VARCHAR(MAX);
SET @ReplaceInput = Replace(@Duplicate_Word,'|',' | ')
SET @Xml = CAST(('
'+REPLACE(@ReplaceInput,' ','
')+'
') AS XML)
;WITH CTE AS (
SELECT
ROW_NUMBER() OVER(ORDER BY A) AS [Sno],
A.value('.', 'varchar(max)') AS [Column]
FROM @Xml.nodes('A') AS FN(A) )
SELECT @Removed_Duplicate_Word =(SELECT Stuff((SELECT '' + ' ' + '' + A.[Column] FROM CTE A
LEFT JOIN CTE B ON A.[Sno]+1=B.[Sno]
WHERE (A.[Column]<>B.[Column] Or B.[Sno] is NULL)
FOR XML PATH('') ),1,1,''))
SET @Removed_Duplicate_Word = Replace(@Removed_Duplicate_Word,' | ','|')
RETURN @Removed_Duplicate_Word
END
GO
Working as expected but it is removing the immediately followed words only removing if any word having between 2 duplicate words not removing
Input: ABC|ABC a ABC ABC
Actual Output: ABC|ABC a ABC
but expected output: ABC|ABC a
Show More