Query question
Posted in 2003
Topics: Server Administration
Hai,
I have a table with 2 cols numid, subid both int
numid subid
1 2
2 1
3 1
1 3
2 4
3 8
1 5
2 5
3 9
Now i like to make a query in dbaccess wich would give my this result:
1 <--numid
2 <\\
3 < --all the subid's belonging to numid 1
5 </
2 <--numid
1 <\\
4 < --all the subid's belonging to numid 2
5 </
3 <--numid
1 <\\
8 < --all the subid's belonging to numid 3
9 </
I tried it with union, i tried it with the set datatype via an temp
table, but i can't get it working.
Any ideas?
Ronald
Check out cdi on groups.google.com, this has been covered in the
last couple of days
Bickel wrote:
>
> Hai,
> I have a table with 2 cols numid, subid both int
> numid subid
> 1 2
> 2 1
> 3 1
> 1 3
> 2 4
> 3 8
> 1 5
> 2 5
> 3 9
>
> Now i like to make a query in dbaccess wich would give my this result:
> 1 <--numid
> 2 <\\
> 3 < --all the subid's belonging to numid 1
> 5 </
> 2 <--numid
> 1 <\\
> 4 < --all the subid's belonging to numid 2
> 5 </
> 3 <--numid
> 1 <\\
> 8 < --all the subid's belonging to numid 3
> 9 </
>
> I tried it with union, i tried it with the set datatype via an temp
> table, but i can't get it working.
> Any ideas?
>
> Ronald
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #