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
Dilshad Ali
NA
815
18.1k
Plz help me in a query..
Sep 10 2015 3:39 PM
Table Name : Header
Id Name Pid
1 KYC
2 AP 1
3 IP 1
4 Security
Query:
SELECT H1.Id, H1.Name as Header, H2.Name as Parents
FROM Header H1
LEFT JOIN Header H2 ON H1.PID = H2.Id;
out put:
id header parents
1 KYC Null
2 AP KYC
3 IP KYC
4 Security Null
But actually i want
id header parents
1 KYC Null
2 KYC AP
3 KYC IP
4 Security Null
plz reply me...........
Reply
Answers (
4
)
Variable with Concatenation in SQL
Calculating distance between One Latitude, Longitude to Anot