Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a table in aceess database which coloums are below:
master code master type master name patent code
001 1 sundry debtors a-1
002 1 north delhi 001
003 1 south delhi 001
004 1 sundry creditors a-2
005 1 west delhi 004
006 2 amir chand 002
007 2 punam chand 003
008 2 cash a-1
009 2 hans raj 005
010 2 ramesh 001


now i want a query in which master type 2 with link 001 & 004 & their sub group

please help me
Posted

XML
You can use group by to do this, read <a href="http://www.sqlservercentral.com/articles/Groouping/70023/">here</a>[<a href="http://www.sqlservercentral.com/articles/Groouping/70023/" target="_blank" title="New Window">^</a>].  I do think you need to hard code the different group names and use union, which is sub optimal.
 
Share this answer
 
Comments
ashok1282 16-Nov-12 11:10am    
please give solution in access database
Christian Graus 16-Nov-12 11:13am    
I don't use access because it sucks. There are SQL embedded solutions that make Access a waste of time IMO. If you can't use group by, then you're hosed, you need to write script to do it manually, I expect.
You can use group by to do this, read here[^]. I do think you need to hard code the different group names and use union, which is sub optimal.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900