Creating table with computed fields containing "SELECT FIRST" produces 
corrupted result
---------------------------------------------------------------------------------------

                 Key: CORE-4027
                 URL: http://tracker.firebirdsql.org/browse/CORE-4027
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.2, 2.5.1
         Environment: Windows 7 x64 and Vista x32, 32-bit Firebird Superserver
            Reporter: Hanno Nagland


Creating table with computed fields that are containing "SELECT FIRST" produces 
corrupted result:

Sample (using Firebird sale database EMPLOYEE.FDB):

CREATE TABLE TEST (
    CUST_NO       INTEGER NOT NULL,
    FIRST_ORDER COMPUTED BY ((SELECT FIRST 1 ORDER_DATE FROM SALES WHERE 
SALES.CUST_NO=TEST.CUST_NO ORDER BY ORDER_DATE)),
    CUSTOMER_NAME COMPUTED BY ((SELECT CUSTOMER FROM CUSTOMER WHERE 
CUSTOMER.CUST_NO = TEST.CUST_NO))
);

Resulting table DLL (first computed column source contains all following 
definitions, second computed column source contains ";"):

CREATE TABLE TEST (
    CUST_NO          INTEGER NOT NULL,
    FIRST_PO_NUMBER  COMPUTED BY ((SELECT FIRST 1 PO_NUMBER FROM SALES WHERE 
SALES.CUST_NO=TEST.CUST_NO ORDER BY ORDER_DATE)),
    CUSTOMER_NAME COMPUTED BY ((SELECT CUSTOMER FROM CUSTOMER WHERE 
CUSTOMER.CUST_NO = TEST.CUST_NO))
);,
    CUSTOMER_NAME    COMPUTED BY ;
);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to