Adding Records at Start
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Jan 8 09:59:25 CST 2004
on 1/8/04 2:43 AM, Mark Maslowski at mark at majico.com wrote:
>> What it looks like you need is to have all level_1 records with the same
>> name to have the same ID.
>>
>> Level_1 Level_2 ID
>> Horse Arab 2
>> Horse Thoroughbred 2
>> Fish Carp 1
>> Fish Goldfish 1
>> Fish Shark 1
>>
>> Using SELECT DISTINCT Level_1 Order by ID
>>
>> Will sort this out into two records with Fish first followed by Horse.
>>
>> If you then want to sort Level_2 as well you would probably need to have a
>> secondary sort ID.
>
> My, aren't we clever! ;) Yes, that seems to have worked.
>
> Thanks a million!
It is good that it works now.
But Mark,
I want want you that you have NOT GOOD db structure!
As you see YOU HAVE DUPLICATES.
This is EXACT SIGN that you have bad design yet.
You can wish to split data into several tables,
Or may be use Table with self - recursion because in your task you can have
any number of levels.
In IDEAL, you must not have DUPLICATE data.
Think about this.
You can read in any RDBMS book rules of table normalization.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list