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
Bhavesh Jadav
NA
1.2k
17.8k
Remove duplicate recoed with exclude one column
Aug 17 2018 1:11 AM
Hello friends,
I have a query like:
select
'1101'
as Id,
'prd1'
as Name,
'1'
as DisplayOrder
union
ALL
select
'1102'
as Id,
'prd2'
as Name,
'2'
as DisplayOrder
union
ALL
select
'1103'
as Id,
'prd3'
as Name,
'3'
as DisplayOrder
union
ALL
select
'1102'
as Id,
'prd2'
as Name,
'4'
as DisplayOrder
And it's output:
But I want output like:
or
What should I do?
How can I get above output using SQL query or from c# code?
Thanks.
Reply
Answers (
7
)
can we used 2 select statement inside the stored procedure
Cannot use Temp Table in SQL server function, why?