Does Sybase ASE 12.5 support general table expressions?

I noticed that Sybase SQL Anywhere supports them, but also cannot find any ASE documentation.

If it is not, what would be the best option for developing a recursive query? In SQL Server 2008, I would do this with CTE, but if it is not available? Perhaps a function?

+4
source share
2 answers

Sybase ASE 12.5 (as well as 15.0) does not support CTE.


You can use an internal query to solve your problem.

Simple CTE:

WITH Sales_CTE (Folders_Id)
AS
-- Define the CTE query.
(
    SELECT Folders_Id FROM Folders
)
SELECT Folders_Id FROM Sales_CTE

matches this:

SELECT aux.Folders_Id
FROM (SELECT Folders_Id FROM Folders) aux

For more information, this !

0
source
  1. 1984 Standard Sybase . , , , SQL ..

    , .. , ( , , , , ). ).

    , , ( , , ), , CTE ; ; ; ; "" ; .

    , , , . . "", .

  2. - SQL. SELECT, , UNION, ; .

CTE, . , , . , . CTE .

-2

Source: https://habr.com/ru/post/1787916/


All Articles