Subject Re: PLAN and stored procedure
Author svein_erling
> Set> SELECT DISTINCT Verzeichnislinks.AID
> Set> FROM Verzeichnislinks
> Set> WHERE EXISTS (SELECT 1 FROM CreateVidListe(12002) CVL WHERE
> Set> CVL.VID = Verzeichnislinks.VID)
> But, Select 1 from Table returns one column with value 1 on number
>of rows like is result of CreateVidListe SP with where condition.

Maybe I just do not understand you Roland, I use SPs all too rarely.
The point is that he is not interested in the value of the subselect,
just whether there is any output row that match the value of
Verzeichnislinks.VID or not. What matters is whether EXISTS return
true or false, the content of the subselect is irrelevant. Anyway, I
do think the other of the two solutions I proposed would be better
(or are you saying that this will not work, and that I should not
treat a stored procedure the same way as I would treat a table?).