Tecnologia, programação e muito Visual FoxPro.

terça-feira, 11 de dezembro de 2012

[Access VBA Central] MS Access changes SQL after open in SQL view? Bracket maybe?

 

I have a VBA query within Access that won't save after I open it.  I wrote this query about 10 years ago and have been out of the "game" for awhile other than just running what I had wrote years ago.  I somewhat remember MS Access changing or maybe deleting a bracket somewhere when you reopened the query?
 
Any help is much appreciated.  Here is the query after I open it:
 
SELECT A.[CFR-LOB], A.Denominator AS [General Account Positions], [A].[Numerator]/[A].[Denominator] AS [Average Credited Rate]
FROM [SELECT [Plan Info].[Val Mapping] AS [CFR-LOB],  Sum(IIF([Plan Info].[Val Mapping] = "Choice/Multi Choice" , IIF([Fixed Buckets].[ValnDate] <= [Fixed Buckets].[GuarDate1], [Fixed Buckets].[Rate1], [Fixed Buckets].[Rate2]),[Fixed Buckets].[Rate1]) * [Fixed Buckets].[Amount]) AS [Numerator], Sum([Fixed Buckets].[Amount]) AS [Denominator]
FROM [Plan Info] INNER JOIN ([Policy Info] INNER JOIN [Fixed Buckets] ON [Policy Info].[Policy Number] = [Fixed Buckets].[Policy Number]) ON [Plan Info].Plancode = [Policy Info].Plancode
GROUP BY [Plan Info].[Val Mapping]]. AS A;

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Nenhum comentário:

Arquivo do blog