Hi,
I am working with Access 2003 and when I try to write this SQl query I receive the error;
thanks
I am working with Access 2003 and when I try to write this SQl query I receive the error;
Code:
Invalid bracketing of name [SELECT (Select Count ([BusinessType..
Code:
[SIZE=2][COLOR=#808080]
[SIZE=2][COLOR=#808080]SELECT A.BusinessType, B.BusinessType, MPESA.Cri1, TAXI.Cri1, MPESA.Cri1/TAXI.Cri1 AS MTCri1, MPESA.Cri2, TAXI.Cri2, MPESA.Cri2/TAXI.Cri2 AS MTCri2, MPESA.Cri3, TAXI.Cri3, MPESA.Cri3/TAXI.Cri3 AS MTCri3, MPESA.Cri4, TAXI.Cri4, MPESA.Cri4/TAXI.Cri4 AS MTCri4[/COLOR][/SIZE]
[SIZE=2][COLOR=#808080]FROM [SELECT ( SELECT Count([BusinessType]) [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] FROM [TblBusTyp] as a [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] WHERE a.[BusinessType]<=[TblBusTyp].[BusinessType] [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] ) AS Cnt, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.BusinessType, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri1, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri2, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri3, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri4[/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] FROM TblBusTyp [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] ]. AS A, [SELECT ( SELECT Count([BusinessType]) [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] FROM [TblBusTyp] as a [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] WHERE a.[BusinessType]<=[TblBusTyp].[BusinessType] [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] ) AS Cnt, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.BusinessType, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri1, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri2, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri3, [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] TblBusTyp.Cri4[/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] FROM TblBusTyp [/COLOR][/SIZE]
[SIZE=2][COLOR=#808080] ]. AS B[/COLOR][/SIZE]
[SIZE=2][COLOR=#808080]WHERE (A.Cnt<B.Cnt);[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]
[/COLOR][/SIZE]
thanks