Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid bracketing problem 1

Status
Not open for further replies.

NeilT123

Technical User
Jan 6, 2005
302
GB
This query has stopped working. I get the message "Invalid bracketing" but I am not sure which bracketing is invalid. Can anyone help please

Code:
SELECT [FieldCode], Sum(Effect) AS SumOfEffect, Yr
FROM [SELECT [FieldCode],NYr0 as Effect,CInt([OM Application Year]) As Yr FROM qry2rptA1
UNION ALL SELECT [FieldCode],NYr1,CInt([OM Application Year]+1) FROM qry2rptA1
UNION ALL SELECT [FieldCode],Nyr2,CInt([OM Application Year]+2) FROM qry2rptA1
]. AS U
GROUP BY [FieldCode], Yr;

Thanks in advance
 
SELECT [FieldCode], Sum(Effect) AS SumOfEffect, Yr
FROM [!]([/!]SELECT [FieldCode],NYr0 as Effect,CInt([OM Application Year]) As Yr FROM qry2rptA1
UNION ALL SELECT [FieldCode],NYr1,CInt([OM Application Year]+1) FROM qry2rptA1
UNION ALL SELECT [FieldCode],Nyr2,CInt([OM Application Year]+2) FROM qry2rptA1
[!])[/!] AS U
GROUP BY [FieldCode], Yr

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV for the prompt and correct response. The query seems to have chaged when I tried to use object dependencies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top