Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set date Italian
- set softseek on
- use GROUP new
- index on Ngr to GROUP
- use STUD new
- set relation to Ngr into GROUP
- set softseek on
- ?"----------1-----------"
- index on fio to fio.ntx
- do while(!eof())
- ? fio, Ngr, GROUP->spec
- skip
- enddo
- ?
- ?"----------2-----------"
- index on fio to fio.ntx
- testNgr = Ngr
- ?Ngr
- ?" ",fio,GROUP->spec
- skip
- do while(!eof())
- if testNgr # Ngr
- ?
- ?Ngr
- endif
- testNgr = Ngr
- ?" ",fio,GROUP->spec
- skip
- enddo
- ?
- ?"----------3-----------"
- index on str(Ngr)+fio to fio.ntx
- testNgr = Ngr
- testSpec = GROUP->spec
- ?Ngr," ",GROUP->spec
- skip
- do while(!eof())
- if testNgr # Ngr
- ?Ngr," ",GROUP->spec
- elseif testSpec # GROUP->spec
- ?Ngr," ",GROUP->spec
- endif
- ?" ",fio
- skip
- enddo
- ?
- ?"----------4-----------"
- index on str(GROUP->spec)+fio to fio.ntx
- testNgr = Ngr
- testSpec = GROUP->spec
- ?GROUP->spec," ",Ngr
- do while(!eof())
- if testSpec # GROUP->spec
- ?GROUP->spec," ",Ngr
- elseif testNgr # Ngr
- ?GROUP->spec," ",Ngr
- endif
- testNgr = Ngr
- testSpec = GROUP->spec
- ?" ",fio
- skip
- enddo
- ?
- ?"----------5-----------"
- index on str(GROUP->spec)+str(Ngr)+fio to fio.ntx
- testSpec = GROUP->spec
- testNgr = Ngr
- ?GROUP->spec," ",Ngr," ",fio
- skip
- do while(!eof())
- if testSpec # GROUP->spec
- ?
- ?GROUP->spec
- endif
- if testNgr # Ngr
- ?
- ?" ",Ngr
- endif
- testSpec = GROUP->spec
- testNgr = Ngr
- ?" ",fio
- skip
- enddo
- ?
- ?"----------6-----------"
- index on str(GROUP->spec)+fio to fio.ntx
- testSpec = GROUP->spec
- ?GROUP->spec," ",fio,Ngr
- skip
- do while(!eof())
- if testSpec # GROUP->spec
- ?GROUP->spec
- endif
- testSpec = GROUP->spec
- ?" ",fio,Ngr
- skip
- enddo
- ?
- _________________________________________________________________________________________________________________
- set date Italian
- st={{'fio','C',15,0},{'sex','L',1,0},{'dr','D',8,0},{'stip','N',8,2},{'Ngr','N',1,0}}
- dbcreate('STUD',st)
- use STUD new
- append blank
- repl fio with "Ivanov"
- repl sex with .t.
- repl dr with CtoD("20-5-1950")
- repl stip with 160.13
- repl Ngr with 1
- append blank
- repl fio with "Sanya"
- repl sex with .f.
- repl dr with CtoD("9-1-1986")
- repl stip with 1500.1
- repl Ngr with 1
- append blank
- repl fio with "Alexandra"
- repl sex with .t.
- repl dr with CtoD("14-6-1998")
- repl stip with 100.0
- repl Ngr with 1
- append blank
- repl fio with "Plebs"
- repl sex with .t.
- repl dr with CtoD("14-6-1998")
- repl stip with 100.0
- repl Ngr with 2
- append blank
- repl fio with "Vanya"
- repl sex with .t.
- repl dr with CtoD("14-2-1997")
- repl stip with 100.0
- repl Ngr with 2
- append blank
- repl fio with "Tripoloski"
- repl sex with .t.
- repl dr with CtoD("13-6-1998")
- repl stip with 100.0120
- repl Ngr with 3
- append blank
- repl fio with "Dada"
- repl sex with .f.
- repl dr with CtoD("12-6-1990")
- repl stip with 1300.0
- repl Ngr with 3
- append blank
- repl fio with "Pupu"
- repl sex with .f.
- repl dr with CtoD("12-10-1990")
- repl stip with 1300.0
- repl Ngr with 3
- gp={{'Ngr','N',1,0},{'spec','N',1,0}}
- dbcreate('GROUP',gp)
- use GROUP new
- SELECT GROUP
- append blank
- repl Ngr with 1
- repl spec with 1
- append blank
- repl Ngr with 2
- repl spec with 1
- append blank
- repl Ngr with 3
- repl spec with 2
- SELECT STUD
- ?fio, sex, dr, stip, Ngr, GROUP -> spec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement