Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
sql inner join query with specifc condition column
Santosh Sasupalli
Nov 7 2017 4:39 AM
153
Reply
hi All,
please help me,
i have 2 tables like this
parent table:
id name
----------------
1 pa
2 pb
3 pc
4 pd
child table:
-----------------
id pid name status
--------------------------
1 1 ca 1
2 2 cb 2
3 1 cc -1
4 1 cd -1
5 2 ce 1
6 3 cf -1
7 4 cg 1
now i want out put like this:
pid cname
1 cc,cd
3 cf
which mean which child status=-1 that names return , separeted and having count(status=-1)>0
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
how to select first 15 days and last 15 days of every month
how to display 24 fortnight in sql server.