nowhere does documentation say "don't use the database name in a SQL Server FROM clause".
Well, if I understand the situation in your project the documentation should not say that, because whether you should or should not use the database name in a FROM clause depends on which query engine you've told Manifold to use. If you've told Manifold to use Manifold's query engine then using alien syntax not used by Manifold's query engine is a mistake. In contrast, if you've told Manifold to use SQL Server's query engine, then it's not a mistake and you should use SQL Server specific syntax, such as using the database name if that's what SQL Server syntax is. If you like, when working with queries involving external data sources you often have a choice of writing queries that use Manifold SQL or using the native SQL implemented within that data source. Manifold's documentation covers how to use either Manifold's or SQL Server's version of SQL depending on which one you want to use, as well as other important info such as the context within which a query is executing, etc. Start with the link I suggested to learn about all that. When doing such things that involve a mix of server side and client side SQL you have to get all the nuances right. For example, note from Manifold's documentation that there's no such construction as [DatabaseName].[SchemaName].[TableName] in Manifold SQL. If your project is set up so a query executes within Manifold's query engine then you must use the syntax that Manifold's query engine uses. It sounds like that's the case, that your project is set up so the query is executing within Manifold's query engine, so Manifold syntax for SQL must be used. If instead you want the query to be executed server side within SQL Server's query engine using Microsoft's syntax for SQL in SQL Server, the info in the topic I recommended should help.
|