Question : Use function as filter for SQL view

I have a function that concatenates the rows from a table and returns them in the form of a string (dbo.fnConcatenateTrainingLineRemarks); and another function (dbo.ParmsToList) that passes a string parameter to that function that I run in a view.  This function works as it should in SQL 2005 (my primary database), however I need it to work in SQL 2000 as well.  This question was initially answered in Q_23045815 for SQL 2005.  Everytime I go to paste the code over the SQL 2000 I get the following error: Server: Msg 170, Level 15, State 1, Procedure vw_ULNsWithTrainingLineRemarks, Line 7
Line 7: Incorrect syntax near '.'.
vw_ULNsWithTrainingLineRemarks is in the code snippet below:
Thanks for your help.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
REATE VIEW [dbo].[vw_ULNsWithTrainingLineRemarks]
AS
SELECT     TOP 100 PERCENT ULNId, Remarks
FROM         dbo.tblULN
WHERE     EXISTS
                          (SELECT     NULL AS Expr1
                            FROM          dbo.ParmsToList(dbo.fnConcatenateTrainingLineRemarks()) AS l
                            WHERE      (dbo.tblULN.Remarks LIKE Value + ' %') OR
                                                   (dbo.tblULN.Remarks LIKE '% ' + Value) OR
                                                   (dbo.tblULN.Remarks LIKE '% ' + Value + ' %'))
ORDER BY ULNId
Open in New Window Select All

Answer : Use function as filter for SQL view

Not sure that is possible in this way (that I know of).
Have you tried building the sql and then executing it... something like....

declare @strSQl varchar(2000)
set @strSQL = 'CREATE VIEW [dbo].[vw_ULNsWithTrainingLineRemarks]
AS
SELECT     TOP 100 PERCENT ULNId, Remarks
FROM         dbo.tblULN
WHERE     EXISTS
                          (SELECT     NULL AS Expr1
                            FROM ' +          dbo.ParmsToList(dbo.fnConcatenateTrainingLineRemarks())
                          + '  AS l WHERE      (dbo.tblULN.Remarks LIKE Value + ' %') OR
                                                   (dbo.tblULN.Remarks LIKE '% ' + Value) OR
                                                   (dbo.tblULN.Remarks LIKE '% ' + Value + ' %'))
ORDER BY ULNId'

exec @strSQL
Random Solutions  
 
programming4us programming4us