将MSAccess查询转换为MSSql查询 [英] Convert MSAccess Query to MSSql Query
本文介绍了将MSAccess查询转换为MSSql查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个在MS-Access中运行的查询,我想将同一查询转换为MSSQL Server.如何转换此查询.查询是
Hi ALL,
I have a query running in MS-Access I would like to convert the same query to MSSQL Server How to convert this query. The query is
SELECT t.[device name], t.[Disk Storage Used(GB)], t.[scan date] AS scandate
FROM [Disk Trending Report] AS t, (SELECT d.[device name], max([Scan Date]) AS scandate FROM [Disk Trending Report] AS d GROUP BY [device name], Format([Scan Date],mm/yyyy) ORDER BY [Device Name]) AS r
WHERE (((r.scandate)=[t].[scan date]) AND ((r.[device name])=[t].[device name]))
ORDER BY t.[device name], t.[scan date];
推荐答案
推荐:使用utf8( unicode)字符集.使用bcp导入到SQL Server中,并使用参数"-Jutf8"和字符模式"-c"指定utf8.
Recommendation: extract the data out of you MySQL database in a delimited file (csv) using the utf8 (unicode) character set. Import into SQL Server using bcp specifying utf8 with "-Jutf8" parameter and character mode "-c".''
这篇关于将MSAccess查询转换为MSSql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文