Quantcast
Viewing latest article 3
Browse Latest Browse All 4

Help with function

Sorry why do you need a function here?

Cant you just do an inline join operation to get the email

ie like

SELECT v.ID_NBR,
CASE 
WHEN et.email LIKE '%@%' THEN et.email 
WHEN v.EMAIL like '%@%' THEN v.EMAIL 
ELSE NULL 
END AS email 
FROM view_a v
LEFT JOIN email_table et 
ON et.ID_NBR = v.ID_NBR
WHERE v.ID_NBR = @id_nbr


Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page


Viewing latest article 3
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>