Thnak You... let me try out....

On Tue, Jun 23, 2009 at 7:48 AM, khan abuzaid noorulhaque <
[email protected]> wrote:

> use group by clause after where clause
>
> strsql =
> "Select distinct sno,companyname,mobileno from Real where Emi='" & emira &
> "' and count('" & siz & "')>0 and '" & siz & "'price<='" & price & "' and
> '" & siz & "'price>'" & rentprice & "' and area='" &
> area.SelectedItem.Text & "'" group by sno,companyname,mobileno
>
>
> On Mon, Jun 22, 2009 at 3:28 AM, Jeena Ajiesh <[email protected]> wrote:
>
>>  Hi all,
>> While i was trying to select some records from db it show 1 error,
>>
>> *An aggregate may not appear in the WHERE clause unless it is in a
>> subquery contained in a HAVING clause or a select list, and the column being
>> aggregated is an outer reference.
>> *
>> How can i solve this problem?
>>
>> My sql query is as follows
>> **
>>
>> Dim emira, siz, price, rentprice As String
>>
>> emira = emi.SelectedItem.Text (Place)
>>
>> siz = size.SelectedItem.Text (Eg: 0,1, 2, 3)
>>
>> Dim strsql As String
>>
>> strsql =
>> "Select distinct sno,companyname,mobileno from Real where Emi='" & emira
>> & "' and count('" & siz & "')>0 and '" & siz & "'price<='" & price & "'
>> and '" & siz & "'price>'" & rentprice & "' and area='" &
>> area.SelectedItem.Text & "'"
>> Can anyone help me to modify this query?
>>
>> --
>> ****************
>> Thanks & Regards,
>> Jeena Ajiesh
>> Email: [email protected]
>>          [email protected]
>>
>>
>
>
> --
> Regards
> Khan Abuzaid
> 9870010998
> Mumbai
>



-- 
****************
Thanks & Regards,
Jeena Ajiesh
Email: [email protected]
         [email protected]

Reply via email to