No it doesn't give the intended result. It only sort, then result in 001,
005....
What is required is to retrieve all the suppliers under the parent supplier
like below.
Supplier Code Supplier Name Total
---------------------------------------------------------------------
001 A 1000
002 B 2000
003 C 3000
004 D 4000
006 F 6000
---------------------------------------------------------------------
005 E 5000
Here 002, 003,004,006 all are under the parent 001 directly or indirectly.
003 and 004 are under the supplier 002.
005 does not have any sub suppliers.
Thanks in advance,
Best
On Sat, Jan 8, 2011 at 12:14 PM, crazy <[email protected]> wrote:
> 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
>