Adding Records at Start

Robert Brenstein rjb at rz.uni-potsdam.de
Thu Jan 8 00:29:52 CST 2004


>  > But you do something strange then.
>>
>>  You have 10 records with the same value in level_1
>>  You want DISTINCT them to produce just ONE record.
>>
>>  Then it is not clear way to use 10 indexes in that 10 records.
>>  You cannot guess which one index will be choosed.
>>  You see?
>
>Well, I'm usually doing something strange! What I am doing is building a
>menu tree, with little folders and files, out of the database. The folders
>are built from the entries in level_1. level_2 is the list of files that go
>into the folders. There might be several files that go into each folder, so
>their level_1 entry would be the same... folder1/file1, folder1/file2,
>folder1/file3, folder2/file1, folder2/file2, etc. So, the reason I need a
>unique list of level_1 is that I don't want to create a new and duplicate
>folder for each and every file.
>
>- Mark

I don't see this so strange, but what Cindy pointed out might be 
truly your problem. And it would be sort of catch 22. Normally, 
sorting requires all sort fields to be included in select but in your 
case this clashes with distinct (actually kills it, since field pairs 
will be always unique).

You may have to forgo the distinct and remove duplicates self or sort 
them self.

Robert


More information about the Valentina mailing list