foxpro - Tricky database query -
there dbms foxpro 2.6 dos. suppose has film library database consisting of 2 tables film , copy_mov. table film soto of following columns id_film, title, director, year table copy_mov soto of following columns: id_cpy, id_film, type_media, format
both tables indexed on field: id_film, id_copy.
we need find movies not released copies. wrote following query sql:
select * film id_film not in (select id_film copy_mov)
it possible implement same, operator seek foxpro?
if want use seek() function in filter:
create cursor film (id_film i) insert film values (1) insert film values (2) insert film values (3) insert film values (4) insert film values (5) create cursor copy_mov (id_film i) index on id_film tag id_film insert copy_mov values (2) insert copy_mov values (5) select * film not seek(id_film, "copy_mov")
if rather want avoid sql select
entirely:
create cursor result (id_film i) select film scan not seek(id_film, "copy_mov") insert result values (film.id_film) endscan select result browse
or perhaps want browse for
select film browse not seek(id_film, "copy_mov")
Comments
Post a Comment