Home All Groups Group Topic Archive Search About

MS SQL Query statement.

Author
25 Nov 2005 3:06 AM
Daniel
Hi All,
Problem statement:
Group 2 tables.

B(B_ID,B_DES)
C(C_ID,B_ID,C_BY)

select B.*,C.*
from b bx inner join cx on bx.b_id=cx.b_id
group by B column,,C column

Output:
B_ID column | C_BY
1                     we
1                     xy
2                     DF


Above result is not what i desired, instead, i needs:
1                    we
                      xy
2                    DF

How to solve it??
thank you in advance..Help will be appreciated.

Best regards,
Gin Lye Khor

Author
25 Nov 2005 3:54 AM
Morgan
Represent the results in a report engine using Group & Detail bands?

Show quote
"Daniel" <Dan***@discussions.microsoft.com> wrote in message
news:9B5D30B5-ADFB-404D-97D1-5CC5DB252BC4@microsoft.com...
> Hi All,
> Problem statement:
> Group 2 tables.
>
> B(B_ID,B_DES)
> C(C_ID,B_ID,C_BY)
>
> select B.*,C.*
> from b bx inner join cx on bx.b_id=cx.b_id
> group by B column,,C column
>
> Output:
> B_ID column | C_BY
> 1                     we
> 1                     xy
> 2                     DF
>
>
> Above result is not what i desired, instead, i needs:
> 1                    we
>                      xy
> 2                    DF
>
> How to solve it??
> thank you in advance..Help will be appreciated.
>
> Best regards,
> Gin Lye Khor
>
>
>

AddThis Social Bookmark Button