以下声明将回复开放Query(MYSQL)的数值。
Select * From OpenQuery(MYSQL, Select * From ResearchRpt ) a
Where Not Exists (Select * From dbo.ResearchRpt where Id_report = a.Id_report)
我希望在结果价值应当 d落的地方扭转这一局面。 研究
感谢。
以下声明将回复开放Query(MYSQL)的数值。
Select * From OpenQuery(MYSQL, Select * From ResearchRpt ) a
Where Not Exists (Select * From dbo.ResearchRpt where Id_report = a.Id_report)
我希望在结果价值应当 d落的地方扭转这一局面。 研究
感谢。
你的问询使用了反jo。 可通过<代码>实施反职业守则。 LEFT JOIN +WHE ISNUL
以及<代码> NOT EXISTS 因此,将你的文字转换为LEFT JOIN版本,向双方倾斜。
SELECT ms.*
FROM dbo.ResearchRpt ms
LEFT JOIN OPENQUERY(MYSQL, SELECT * FROM ResearchRpt ) my
ON my.Id_report = ms.Id_report
WHERE my.Id_report IS NULL
-- Only exists
SELECT ms.*, my.Id_report
FROM dbo.ResearchRpt ms
LEFT JOIN OPENQUERY(MYSQL, SELECT * FROM ResearchRpt ) my
ON my.Id_report = ms.Id_report
WHERE my.Id_report IS NOT NULL
I have installed ASP.NET application with database on our server. ASP.NET application created database using connection string below. The problem is that I do not see database in SQL Server Management ...
What datatype is the most efficient to store a number such as 11.111. The numbers will have up 2 digits before the point and up to three after. Currently the column is a bigint , I am guessing that ...
是否需要在提瓜表之后更新表格统计数据,还是自动更新?
Ok, so I ve got a bit of a SQL and Powershell problem. There are 2 SQL scripts, one to setup 4 different global stored procedures. Another to execute them and manipulate data before returning it to PS ...
I add a column of type tinyint and being set to not allow nulls in a table and generate the change scripts. The table has data in it at this time. The script has code that creates a temp table and ...
I am currently working on a particularly complex use-case. Simplifying below :) First, a client record has a many-to-one relationship with a collection of services, that is, a single client may have ...
I have a particularly troublesome xml column to query data from. The schema is fixed by the Quebec Ministry of Revenue so "it is what it is" The important part of the query looks like this: with ...
I ve got a content management system that contains a hierarchical structure of categories, with sub-categories subject to different ordering options at each level. Currently, that s retrieved by a (...