on 2024 Jul 09 11:18 PM
i have this select query below.
SELECT @ColumnName = ISNULL(@ColumnName + ',', '') + QUOTENAME(TestName) FROM (SELECT DISTINCT [TestName] FROM #Test t INNER JOIN #Marks m ON m.TestID =t.TestID WHERE Semester = @Semester) AS [TestName]
Sybase give this error : Function 'QUOTENAME' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
how this fix this.. Thank you
What are you trying? This looks very complicated just to get all the test names... How about:
select list(distinct TestName) into @ColumnName from #Test inner join ...
or, if you need the quotes and maybe sorted:
select list(distinct '''' || TestName'''' order by TestName) into @ColumnName from #Test inner join ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
10 | |
10 | |
7 | |
7 | |
7 | |
7 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.