请大虾们帮帮忙啊!
DLSQL = "SELECT Max([HY]) AS [HY],Min([LY]) AS [LY] FROM ("DLSQL = DLSQL & " SELECT Max([EX-Time]) AS [HY],Min([EX-Time]) AS [LY] FROM [Expenditure]"
DLSQL = DLSQL & " Union SELECT Max([C-AcceptDate]) AS [HY],Min([C-AcceptDate]) AS [LY] FROM [CreditCard]"
DLSQL = DLSQL & " Union SELECT Max(A.[S-Date]) AS [HY],Min(A.[S-Date]) AS [LY] FROM [G-Title] AS A,(SELECT DISTINCT [G-Number] FROM [GroupMembers] WHERE ([D-Subscribe]+[D-Discount]+[D-RealMeney]+[D-Card]) > 0) AS B WHERE A.[G-Number] = B.[G-Number] "
DLSQL = DLSQL & ")"
我运行后出现下面的信息
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: ')' 附近有语法错误。
数据库连接都是没错的。
大家看看哪里出错了啊,谢谢啦!!!