using SQL select the record  ORDER BY Supplier Name, Supplier level

Using Crystal report group by records and display it.

On Sat, Jan 8, 2011 at 8:35 AM, yash <[email protected]> wrote:

> Hi :)
>
> Consider the following  SQL table
>
> Supplier Code | Supplier Name  | Supplier Level  | Parent Supplier |
> Total
> 001                  A
> 1                  null                1000
> 002                  B
> 2                  001                2000
> 003                  C
> 3                  002                3000
> 004                  D
> 3                  002                4000
> 005                  E
> 1                  null                5000
> 006                  F
> 2                 001                6000
>
> Now I want to retrieve details of the Parent suppliers and the sub
> suppliers like below.
>
> Supplier Code          Supplier Name           Total
> ---------------------------------------------------------------------
> 001                          A                             1000
>         002                 B                             2000
>                  003        C                             3000
>                  004        D                             4000
>         006                                                6000
> ---------------------------------------------------------------------
> 005                                                         5000
>
>
> I want to get the result like above, that is, all the suppliers
> directly or indirectly under the parent supplier. How can I get this
> using SQL queries or using crystal reports.
>
> Thanks in advance,
> Best
>



-- 
"People who never make mistakes, never do anything."

dEv

Reply via email to