Alright. I worked so hard over the past few weeks to learn the .NET data provider for teradata and set up an infrastructure to query Teradata data sources. Everything is great except....
Canonical Entity functions are not supported by the provider. Alright. Then I look at the link below which says I should use "Teradata.DiffDays" and "EntityFunctions.DiffDays".
I merrily try to use "Teradata.DiffDays" in my LINQ to Entities query thusly:
var results = IMAccts.Where(acct => acct.ACCT_CLSD_DT != null && Teradata.DiffDays(ACCT_OPEN_DT, ACCT_CLSD_DT) >= 90).Dump();
The type or namespace name 'DiffDays' does not exist in the namespace 'Teradata'.
However, I observe that the same Teradata.DiffDays can be used in Entity SQL like this:
select Teradata.DiffDays(ACCT_OPEN_DT,ACCT_CLSD_DT) as diff from IMAccts
My questions are:
1) How is it possible that the function under the "Teradata" namespace is recognized in Entity SQL and not in LINQ to Entities?
2) Is it possible for me to work around this by supplying my own DateDiff function? (Please note that collecting the data locally and then applying date manipulation is definitely not an option)