i have a problem in joining two tables the reason is my first table persdata is having common field as pno (a single row in a particular person) and the second tables is also having pno(having muti entry for a person as this table is of qualification and a person may have more than 3 qualifications and their grading) sample persdata(table) pno name coy appt sample qual(table) pno qual grading recommendation i tried my best to do it and not able to proceed i want the output in a single row as in persdata to a gridview with all the qual combined in one coloumn and all the recommendations combined in one coloumn for a person. i am requesting for you help on this
Could you please share some sample data for both tables so that we can build a query
Sample Persdata Table
pno name coy appt
136a ak singh it1 sys admin
142k ravi k it2 sys admin
144h ss nair it1 asst sys admin
132P Hussain k it3 mech engr sample qual(table) pno qual grading recommendation
136a ccna A KKLE
142k ddcn B
144h ccna A KKCT
132p btech(mech) D KKME
136A DDCN A
142K CCNA B KKCT
144H BTECH(CS) A
132P BASIC AUTO A
THE PERSDATA IS HAVING A PERSONS NUMBER ONE TIME AND IN QUAL TABLE ONE PERSON HAS MORE THAN TWO ROWS because he had done more then one course
select t1.pno,t1.name,t1.coy,t.appt,t2.qual,t2.grad,t2.recommandation from table t1 ,tablet2 where t1.pno= t2.pno
group by t1.pno,t1.name,t1.coy,t.appt,t2.qual,t2.grad,t2.recommandation
gives error
Try this and check
select t1.pno,t1.name,t1.coy,t.appt,t2.qual,t2.grad,t2.recommandation from table t1 ,table t2 where t1.pno= t2.pno group by t1.pno,t1.name,t1.coy,t.appt,t2.qual,t2.grad,t2.recommandation
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.