When reverse engineering using a DDL script file to create a Table-Value function, the DDL check fails with the following error message "Found with, Expecting: ( SELECT".
Steps to Reproduce:
1. Create a script with the following lines of code:
CREATE FUNCTION [dbo].[CTE_Test]()
RETURNS TABLE
AS
RETURN
(
with myCTE as (
Select * from mytable
where price > 100
)
Select * from myCTE
)
2. Reverse Engineer using the above DDL script for a MS SQL Server 2008 database.
3. In the Connecting tab of the Reverse Engineering Wizard, click 'Check DDL Script' button.
Actual Results:
DDL script is not processed as the following line of code is flagged as being incorrect:
with myCTE as (
Error message is displayed: "Found with, Expecting: ( SELECT".