Does anybody know if Common Table Expressions and User-defined functions (not from Java) are supported on Sybase 12.5? I'm trying but could not seem to make these work. Thanks guys.
Asked
Active
Viewed 447 times
3

Danny Beckett
- 20,529
- 24
- 107
- 134

Ver Argulla
- 71
- 2
- 9
-
I'm referring to Sybase ASE 12.5 – Ver Argulla Mar 29 '11 at 23:12
-
There is some info in related question here: http://stackoverflow.com/questions/4803573/does-sybase-ase-12-5-support-common-table-expressions – Lukas Eder Sep 04 '11 at 08:42
3 Answers
0
Sorry I have to disagree. Microsoft SQL Server is based on Sybase 7.0. So there may not be Common Table Expressions and User-Defined Functions, there are equivalent ways to do the same thing.
For example CTE can be done either in nested queries or via temp tables using a number sign (#) in front of the table name.
For User Defined Functions, create a stored procedure with simple SQL code and call it via the exec function for example "exec my_sql_code". This allows nesting of stored procedures.
Good SQL, good night.

Mike Kelley
- 41
- 2
-
We are talking about 'feature' availability. What you've mentioned are workarounds. – Aug 24 '12 at 08:06
0
You can use stored procedure instead of functions. I am not sure about what you are referring to by saying common table expressions

George Duckett
- 31,770
- 9
- 95
- 162

Aditya
- 549
- 1
- 6
- 11