Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Access
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 16-Nov-12 5:45am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
ashok1282 at 16-Nov-12 11:10am
   
please give solution in access database
Christian Graus at 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.

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

  Print Answers RSS
0 OriginalGriff 165
1 Sergey Alexandrovich Kryukov 134
2 Sebastiaan Meijerink 131
3 Rana Waqas 110
4 Maciej Los 84
0 Sergey Alexandrovich Kryukov 6,558
1 OriginalGriff 6,288
2 Peter Leow 2,534
3 Abhinav S 2,358
4 Maciej Los 2,352


Advertise | Privacy | Mobile
Web04 | 2.8.150414.1 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100