15,892,965 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 tpkpradeep (Top 13 by date)
tpkpradeep
2-Dec-15 7:40am
View
hi OriginalGriff
how about this..
select dup1.name1,dup1.tab1,dup1.dist
from
(
select t.rk
from
(
SELECT t1.name1 tab1,t2.name1,dense_rank() over (order by t1.name1) as rk
FROM #tmp_dup t1
inner join #tmp_dup t2 on t1.name1 = t2.name2 and t1.name2 = t2.name1
AND t1.Name1 NOT IN (SELECT name2 FROM #tmp_dup WHERE name2=t1.name1 AND name1 = t2.name2)
group by t1.name1,t2.name1
) as t
group by t.rk
having count(t.rk) = 1
) as dup
left outer join
(
SELECT t1.name1 tab1,t2.name1,dense_rank() over (order by t1.name1) as rk,t1.dist
FROM #tmp_dup t1
inner join #tmp_dup t2 on t1.name1 = t2.name2 and t1.name2 = t2.name1
AND t1.Name1 NOT IN (SELECT name2 FROM #tmp_dup WHERE name2=t1.name1 AND name1 = t2.name2)
group by t1.name1,t2.name1,t1.dist
) as dup1 on dup.rk = dup1.rk
tpkpradeep
1-Dec-15 15:26pm
View
:) I know..,
I tried this
with cte as(
select name1,name2,
row_number() over
(
order by name1,name2
) as cnt
from
#tmp_dup
group by name1,name2
)
select t1.name1,t1.name2,t1.rk
from
(
select a.name1,a.name2,a.cnt as cnt,
dense_rank() over (order by a.name1) as rk
from cte a
where exists(
select 1 from cte b where a.name1 = b.name2 and a.name2 = b.name1)
) t1
group by t1.name1,t1.name2,t1.rk
i got output as below
name1 name2 rk
BG CH 1
CH BG 2
CH HY 2
HY CH 3
but i got strucked removing the value 2
tpkpradeep
1-Dec-15 14:22pm
View
I'd probable create an SQL function which took the two names, and returned a composite name that was ordered, so the BG, CH returned the same value as CH, BG
How can i perform this? I tried in different ways but i couldn't.., help me this.., please
tpkpradeep
1-Dec-15 14:21pm
View
well good question.. :) customers of different type.., :)
tpkpradeep
10-Aug-15 6:19am
View
DECLARE @TID CHAR(2)
SET @TID = 'ON'
WHERE @TID = (CASE WHEN C.TID IS NULL OR C.TID = '' THEN C.TTID
WHEN R.TID IS NULL THEN U.TID ELSE R.TID END)
Sorry I forgot to add the above.
tpkpradeep
31-Jul-15 2:40am
View
Thanks for reply!!
I'm understanding in this way
In SQL session closes #table gets deleted
but in oracle table will be there but rows get deleted!! Am I getting your point correct!?
tpkpradeep
22-Mar-14 12:59pm
View
http://www.dotnet-tricks.com/Tutorial/mvc/906b060113-Controlling-Session-Behavior-in-Asp.Net-MVC4.html
tpkpradeep
20-Mar-14 2:34am
View
for x.selecteditem i am seeing the first value from result
with first value of result i need to access the third value also how to do that..? What does it actually Mean..? Post your code
tpkpradeep
22-Feb-14 13:22pm
View
Then I confess I don't how this make to work.. Pls suggest me alternate method..
tpkpradeep
6-Oct-13 3:13am
View
Yes Sure I posting my Code below it's really an urgent requirement..!! It's very Urgent..!!!
tpkpradeep
3-Sep-13 7:38am
View
BEGIN CATCH
DECLARE @ERRMSG NVARCHAR(MAX)
SELECT @ERRMSG =ERROR_MESSAGE();
RAISERROR(@ERRMSG,16,0);
END CATCH
Actually my catch Block Looks Like this...!!!
tpkpradeep
19-Jan-13 7:15am
View
can you give me the code....,
below is what im using....,
string role = string.Empty;
var sb = new StringBuilder();
var collection = cmbifsc.CheckedItems;
foreach (var item in collection)
sb.Append("%" + item.Text + "%,");
role = sb.ToString().Substring(0, sb.ToString().Length - 1);
role=cmbifsc.selecteditem.text;--this will take selected values..
how to give the if condition.?
tpkpradeep
2-Jan-13 5:03am
View
Im using sql server 2012...,
Show More