[V4RB] Deleting "loose" records
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Jul 26 03:53:23 CDT 2007
On 24/7/07 7:12 PM, "Joerg Pressel" <joergp at three-2-one.com> wrote:
Hi Joerg,
> many thanks for pointing me in the right direction. However, took me
> some more research for coming up with the complete solution:
>
> In the table definition of "Titles":
> mGenrePtr = New VObjectPtr("Genre_Ptr", inDataBase.mGenres,
> EVOnDelete.kRestrict, EVFlag.fNone, "link_tracks_genre")
>
> Call to delete obsolete, not linked records in "Genres":
> Call SqlExecute("DELETE FROM Genres WHERE COUNT_LINKED(Genres,
> link_tracks_genre)=0")
You ask if this is correct?
Looks yes.
Just I not remember if LINK_COUNT() works in the WHERE clause.
If not then possible workaround can be define METHOD with this formula
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list