SET DEFAULT TO z:\ro2009\baze

OPEN DATABASE belcar SHARED 

USE zagfak ALIAS zagfak shared IN 0
USE kupdob ALIAS kupdob shared IN 0

SELECT zagfak
GOTO top
DO WHILE !EOF()
a1=zagfak.kupdob
SELECT kupdob
SET ORDER TO tag kupdob
GOTO top
SEEK a1
IF FOUND()
	SELECT zagfak
	replace zagfak.nazkom WITH kupdob.naziv
ENDIF
SELECT zagfak
SKIP
ENDDO
	