Dynamic SQL Error SQL error code = -104 Token unknown AND - EF Core - Two or 
more *Where* parameters in LINQ to SQL 
--------------------------------------------------------------------------------------------------------------------

                 Key: DNET-926
                 URL: http://tracker.firebirdsql.org/browse/DNET-926
             Project: .NET Data provider
          Issue Type: Bug
         Environment: FirebirdSql.Data.FirebirdClient - Firebird .NET EF Core
            Reporter: Ryno
            Assignee: Jiri Cincura


 List<Document> documents = new List<Document>();

            var docs = (from d in db.Documents
                        where d.DOCUMENT_DATE >= startDate & d.DOCUMENT_DATE <= 
endDate
                        select d).ToList();

            foreach (Document doc in docs)
            {
                documents.Add(doc);
            }

            return documents;



RETURNS 

SELECT "d"."DOCUMENT_ID", "d"."CLIENT_REF", "d"."CONVERSION_RATIO", 
"d"."CUSTOMER_CODE", "d"."DELIVERY_ADDRESS", "d"."DOCUMENT_DATE", 
"d"."DOCUMENT_TIME", "d"."DOC_NUMBER", "d"."DOC_STATUS", "d"."DOC_TYPE", 
"d"."EXCL", "d"."EXL_BIN", "d"."EXL_OVERREC", "d"."EXL_SURCHARGE", 
"d"."EXL_TRANSPORT", "d"."FINANCAIL_PERIOD", "d"."GROSSWEIGHT", "d"."INCL", 
"d"."INCL_BIN", "d"."INCL_OVERREC", "d"."INCL_SURCHARGE", "d"."INCL_TRANSPORT", 
"d"."INSTRUCTIONS", "d"."M3_QTY", "d"."MANUAL_NUMBER", "d"."OPTIONS", 
"d"."ORDER_NUMBER", "d"."PRICELIST_ID", "d"."PRODUCT_CODE", "d"."PRODUCT_UNIT", 
"d"."QTY", "d"."SUPPLIER_CODE", "d"."SURCHARGE_QTY", "d"."TRUCKTARE", 
"d"."VAT", "d"."VAT_CODE", "d"."VEHICLE_REG", "d"."ZONE_CODE"
FROM "DOCUMENT" AS "d"
WHERE (CASE
    WHEN "d"."DOCUMENT_DATE" >= CAST(@__startDate_0 AS TIMESTAMP)
    THEN TRUE ELSE FALSE
END AND CASE            ---- ERROR
    WHEN "d"."DOCUMENT_DATE" <= CAST(@__endDate_1 AS TIMESTAMP)
    THEN TRUE ELSE FALSE
END) = TRUE

Which is invalid FB Sql


-- 
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

        


_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to