Hi, I have a stored procedure that should return me a field with string data
My storedProc has 2 parameters
I don't know if I can do that but I want to call the sp during a SELECT depending of a CASE
SP:
Now here's my SELECT:
I know that written like that, it doesn't work... But Is there a way to make it works?
Thanks
Mel
My storedProc has 2 parameters
I don't know if I can do that but I want to call the sp during a SELECT depending of a CASE
SP:
Code:
Create proc spChListe
@ElementListeID int = 205,
@ListeID int = 7
AS
DECLARE @Title AS varchar(8000)
SET @Title=''
SELECT @Title=@Title+Donnees+Suffixe FROM T1
SELECT @Title
Now here's my SELECT:
Code:
SELECT
CASE TypeDonneesID
WHEN 10 THEN
CASE WHEN Donnees <> ''
THEN
[b]spChListe 205,7[/b]
else '' END
ELSE
Donnees
END as Donnees
FROM T2
I know that written like that, it doesn't work... But Is there a way to make it works?
Thanks
Mel