Alright. So I looked at this page: http://developer.teradata.com/doc/connectivity/tdnetdp/14.10/webhelp/EntityProviderCanonicalFunction.... It mentions that canonical functions for .NET 4.0 are supported under the "Teradata" namespace. Where in the world is this namespace? I have referenced Teradata.Client.Entity.Dll, Teradata.Client.Provider.Dll, Teradata.Client.Provider.Resources.Dll. None of these is helping me find the elusive "Teradata" namespace. Please help. I have already wasted countless hours on this!
i'm not a .NET programmer, but when i looked at the link you provided i found
For example, to execute a .NET Framework 4.0 supported EndsWith(SearchString, TargetString) function, prepend Teradata to the command (Entity SQL command below)
plus an example how to use it
SELECT e.CompanyName, Teradata.EndsWith(e.CompanyName, "d")
FROM NorthwindEntities.Customers AS e order by e.customerId
So, did you try to add "Teradata." in front of the name?
Yes. Of course, the query won't compile in that case. Error message: The type or namespace name 'DiffDays' does not exist in the namespace 'Teradata'.
sorry that i asked such a basic thing, but some people don't really read documentation :-)
IMHO it should be in Teradata.Client.Provider, what if you try any other function from that namespace?
Of course, you could replace that all those .NET function with a generic TD function.
>>>Of course, you could replace that all those .NET function with a generic TD function.
What do you mean by that? The canonical functions are expressly provided by Teradata to interoperate with the Entity Framework. I cannot replace that with any function of my own.
This is so frustrating...... I worked so hard over the past few weeks to get LINQPad to query a Teradata data source only to learn that the canonical functions can only be used in Entity SQL and not in "LINQ to entities". What a lousy artificial limitation....
sorry for the late answer.
With "replace" i ment you could write it directly using Teradata SQL, afaik the .NET provider simply translates all those functions to valid Teradata SQL
e.g. DiffDays(date1, date2) = date2 - date1
Of course this means database specific code again...