Hello,
I have two related files :
The first “pere.rec with :
- QES File
Fiche ####
var1 ##
var2 ##
- CHK File
fiche
key unique
end
var2
if var2=1 then
relate fiche pere.rec
endif
if var2<>1 then
gotowrite
endif
end
The second “fille.rec” with :
- QES File
fiche ####
var3 ##
var4 ##
- CHK File
fiche
key
end
These two related files are correct to entry.
But, in analysis, the commands :
Read "D:\Bernard\Epidemio\pere.rec"
merge fiche /file=”fille.rec"
Reponse of software :
Non-unique key in: D:\Bernard\Epidemio\fille.rec
It is the same problem with “key unique” and “key” with “1” at the end.
Thank you your help.
Bernard Branger, France
_____
J’utilise la version gratuite de SPAMfighter http://www.spamfighter.com/lfr pour utilisateurs privés. Jusqu’à présent SPAMfighter a bloqué 1455 courriels spam.
Optimisez votre PC trop lent http://www.spamfighter.com/SLOW-PCfighter/Lang_FR/?cid=sigfr
The correct way to read these files into analysis is:
read "d:\bernard\epidemio\fille.rec" merge fiche /file="pere.rec"
merge requires key unique in the file it reads.
Jamie Hockin Ottawa
On 2010-04-03, Bernard wrote:
These two related files are correct to entry.
But, in analysis, the commands :
Read "D:\Bernard\Epidemio\pere.rec"
merge fiche /file=”fille.rec"
Reponse of software :
Non-unique key in: D:\Bernard\Epidemio\fille.rec
An alternative is reading in the child file first, if the child file has multiple entries for the same parent file:
read "d:\bernard\epidemio\fille.rec" merge fiche /file=pere.rec" /table
This uses the "pere" file as a look-up table (see Help file in analysis) and "fiche" needs to be unique only in the parent but not the child file,
Hans
On 20:59, epidata-list@lists.umanitoba.ca wrote:
The correct way to read these files into analysis is:
read "d:\bernard\epidemio\fille.rec" merge fiche /file=ere.rec"
merge requires key unique in the file it reads.
Jamie Hockin Ottawa
participants (1)
-
epidata-list@lists.umanitoba.ca