Re: oledb-group by
- From: "iso" <ismailozyigit@xxxxxxxxxxx>
- Date: Wed, 16 Nov 2005 11:31:45 -0600
thanks everybody
Actually we solved the problem using conn1.execute('set engine behavior 70')
than it behave like we use ODBC dll. the problem was when we use OLEDB we
have to mention the field name that come after GROUP BY as in "select
f1,... from ...group by f1"
When we use VFPODBC.dll we don't use like that.Actually above useage is
regular group by usage.
But it was not easy to change all the code.
then I set engine behavior to 70 just after opening connection. now it is
working.
thanks.
ismail
"Olaf Doschke" <T2xhZi5Eb3NjaGtlQFNldG1pY3MuZGU@xxxxxxxxxx> wrote in message
news:ePXEsBq6FHA.2600@xxxxxxxxxxxxxxxxxxxxxxx
> In general the GROUP BY clause works like it should in
> OLEDB. Since the latest ODBC driver only has the SQL
> engine of VFP6, you could use it wrongly before, like
> Anders pointed out.
>
> eg.
>
> select band, title, ;
> count(*) as NumberOfTitles;
> from songs;
> group by band
>
> is wrong but worked in ODBC/older VFP versions. ODBC
> may have given you the first title it found as title. In general you
> would either have to group by band AND title, but then would
> mostly have a count of 1 or use MIN(title) to have the
> alphabetical first title or leave out the title completely.
>
> In general you must group by all simple fields, that you select
> and don't use some aggregating function on them, like
> MIN, MAX, AVG, SUM, COUNT. If you think about
> it, it's logical and necessary.
>
> Another scenario, that doesn't work at all with group by
> or distinct is a memo field in the result set.
>
> Bye, Olaf.
>
>
.
- Follow-Ups:
- Re: oledb-group by
- From: Anders
- Re: oledb-group by
- References:
- oledb-group by
- From: iso
- oledb-group by
- Prev by Date: Re: Index Sequence
- Next by Date: Re: Index Sequence
- Previous by thread: Re: oledb-group by
- Next by thread: Re: oledb-group by
- Index(es):
Relevant Pages
|
Loading