I have several places where I used the subquery like this
in my store procedure
SELECT *
FROM MASTER_NEW
WHERE ProductCode NOT IN
(SELECT ProductCode FROM MAPSDATA)
I am going to use the subquery
FROM MASTER_NEW
WHERE ProductCode NOT IN
(SELECT ProductCode FROM MAPSDATA)
in serveral other places in the stored procedure, like
select count(*)
FROM MASTER_NEW
WHERE ProductCode NOT IN
(SELECT ProductCode FROM MAPSDATA)
Is there any ways that I can save the set once and use over and over again to save
some time?
Thanks a lot. Any tips will greatly appreciated


Reply With Quote