Subject | Re: PLAN and stored procedure |
---|---|
Author | svein_erling |
Post date | 2002-08-16T17:34:25Z |
> Set> SELECT DISTINCT Verzeichnislinks.AIDMaybe I just do not understand you Roland, I use SPs all too rarely.
> 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.
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?).
Set