How would you distihguish 2 records with the same key than?
>Okay, sorting is done by id, field2, then time. The computer does the sort past that. I think Null comes before not null fields. Id and field2 will never be Null for this situation. And yes there can be more then 1 record per period with Null.
>
>Am I coming close to answering this question?
>
>Beth
>>How records with NULL is sorted relativly to other records? Can there be more than 1 recotd with nulls per period?
>>
>>>The meaning of NULL in the timefield column means that there was no run attached to the stop for the person.
>>>
>>>The table I am moving around is built from 10 other tables. This was being done in vfp by getting the built table into a recordset and then looping through it and building the records by hand and inserting them one by one. Since there is ~250000 that goes done to ~94500 records in vfp, and takes about 30 minutes. We thought putting the select and build into a SP, we could speed up the process.
>>>
>>>
>>>>What is meanung of NULL in the timefield column? How records with NULL is sorted relativly to other records?
>>>>
>>>>>there can be 6 records for morning and 6 records for afternoon, any others are ignored.
>>>>>
>>>>>>How many records could be in each group?
>>>>>>
>>>>>>>
>>>>>>> This query is suppose to combine another table into a wide table. From my questions before about getting records from going down to going across:
>>>>>>>
>>>>>>>id timefield field1 field2 field3 field4
>>>>>>>1 01/01/00 15:45 hi 0 check field
>>>>>>>1 01/01/00 7:48 bye 1 double main
>>>>>>>2 01/01/00 14:51 hi 0 check field
>>>>>>>2 01/01/00 8:48 bye 1 NULL main
>>>>>>>3 NULL get 0 fake NULL
>>>>>>>3 NULL get2 1 fake NULL
>>>>>>>4 01/01/00 16:05 get1 1 fake NULL
>>>>>>>
>>>>>>>need to get into this form:
--sb--