This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C4F8E0.497343B0
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

In vfp8 or former version, I can use the following sql sentences:

Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor =
TempCurs
*/* Badrs is one field of table emp

But in vfp9, It's a wrong sentences?
Why vfp9 hv such difference from the former version?

Best Regards

Chuen


------=_NextPart_000_000A_01C4F8E0.497343B0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.3790.218" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>In vfp8 or former version, I can use =
the following=20
sql sentences:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2>Select distinct =
Alltrim(Badrs) From=20
Emp Order By Badrs Into Cursor TempCurs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*/* Badrs is one field of table =
emp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But in vfp9, It's a wrong =
sentences?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why vfp9 hv such difference from the =
former=20
version?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Chuen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000A_01C4F8E0.497343B0--

Re: Why comes such error? by Olaf

Olaf
Wed Jan 12 06:28:17 CST 2005

>Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor TempCurs

This example works for me in vfp9beta:

Create Cursor emp (badrs c(10))
INSERT INTO emp VALUES ("hi")
INSERT INTO emp VALUES ("world")
INSERT INTO emp VALUES ("hi")
INSERT INTO emp VALUES ("world")
Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor TempCurs

Do you already use the release version?

Bye, Olaf.



Re: Why comes such error? by chuen

chuen
Wed Jan 12 07:21:29 CST 2005

Yes, I use the release version.

"Olaf Doschke" <T2xhZi5Eb3NjaGtlQFNldG1pY3MuZGU@strconv.14> дÈëÓʼþ
news:#M#MULK#EHA.1392@tk2msftngp13.phx.gbl...
> >Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor
TempCurs
>
> This example works for me in vfp9beta:
>
> Create Cursor emp (badrs c(10))
> INSERT INTO emp VALUES ("hi")
> INSERT INTO emp VALUES ("world")
> INSERT INTO emp VALUES ("hi")
> INSERT INTO emp VALUES ("world")
> Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor
TempCurs
>
> Do you already use the release version?
>
> Bye, Olaf.
>
>



Re: Why comes such error? by Olaf

Olaf
Wed Jan 12 08:23:38 CST 2005

> Yes, I use the release version.

In the help of vfp9, is there a chapter
"behaviour changes since version 8"
or something like that, which explains that?

What error message do you get?

Does one of these work? (although I doubt):

Select distinct Alltrim(Badrs) As cBadrs From Emp Order By Badrs
Select distinct Padr(Alltrim(Badrs),254) As cBadrs From Emp Order By Badrs

Bye, Olaf



Re: Why comes such error? by Rick

Rick
Wed Jan 12 08:31:42 CST 2005

Chuen,
The help (and ANSI standards) clearly states:
"The GROUP BY clause specifies one or more columns used to group rows =
returned by the query. Columns referenced in the SQL SELECT statement =
list, except for aggregate expressions, must be included in the GROUP BY =
clause."

In other words you can't group by anything not in the field list.=20
This works:
Select distinct Alltrim(Badrs), Badrs ;
From Emp Order By Badrs Into Cursor TempCurs

Or this works:
Select distinct Alltrim(Badrs) as ATBadrs ;
From Emp Order By ATBadrs Into Cursor TempCurs

Or even this works:
Select distinct Alltrim(Badrs) ;
From Emp Order By 1 Into Cursor TempCurs

Rick

"chuen" <cnchuen@hotmail.com> wrote in message =
news:ODBClmK%23EHA.3472@TK2MSFTNGP14.phx.gbl...
> Yes, I use the release version.
>=20
> "Olaf Doschke" <T2xhZi5Eb3NjaGtlQFNldG1pY3MuZGU@strconv.14> =
=D0=B4=C8=EB=D3=CA=BC=FE
> news:#M#MULK#EHA.1392@tk2msftngp13.phx.gbl...
>> >Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor
> TempCurs
>>
>> This example works for me in vfp9beta:
>>
>> Create Cursor emp (badrs c(10))
>> INSERT INTO emp VALUES ("hi")
>> INSERT INTO emp VALUES ("world")
>> INSERT INTO emp VALUES ("hi")
>> INSERT INTO emp VALUES ("world")
>> Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor
> TempCurs
>>
>> Do you already use the release version?
>>
>> Bye, Olaf.
>>
>>
>=20
>

Re: Why comes such error? by Paul

Paul
Wed Jan 12 09:18:58 CST 2005

This is a multi-part message in MIME format.

------=_NextPart_000_0029_01C4F876.FB75B080
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

SELECT ALLTRIM(field) is generally a bad idea, because the size of the =
field in the resulting table varies with the data. But perhaps you can =
make it work by casting the result to a varchar:

SELECT CAST(ALLTRIM(field) AS VARCHAR(30))...


"chuen" <cnchuen@hotmail.com> wrote in message =
news:uSsh$0J%23EHA.1396@tk2msftngp13.phx.gbl...
In vfp8 or former version, I can use the following sql sentences:

Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor =
TempCurs
*/* Badrs is one field of table emp

But in vfp9, It's a wrong sentences?
Why vfp9 hv such difference from the former version?

Best Regards

Chuen


------=_NextPart_000_0029_01C4F876.FB75B080
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>SELECT ALLTRIM(field) is generally a =
bad idea,=20
because the size of the field in the resulting table varies with the =
data. But=20
perhaps you can make it work by casting the result to a =
varchar:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>SELECT CAST(ALLTRIM(field) AS=20
VARCHAR(30))...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"chuen" &lt;<A=20
href=3D"mailto:cnchuen@hotmail.com">cnchuen@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:uSsh$0J%23EHA.1396@tk2msftngp13.phx.gbl">news:uSsh$0J%23EHA.=
1396@tk2msftngp13.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>In vfp8 or former version, I can use =
the=20
following sql sentences:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2>Select distinct =
Alltrim(Badrs) From=20
Emp Order By Badrs Into Cursor TempCurs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*/* Badrs is one field of table =
emp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But in vfp9, It's a wrong =
sentences?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why vfp9 hv such difference from the =
former=20
version?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Chuen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0029_01C4F876.FB75B080--


Re: Why comes such error? by Olaf

Olaf
Wed Jan 12 11:28:50 CST 2005

Hi Rick,

>The help (and ANSI standards) clearly states:
>"The GROUP BY clause ..."

Isn't DISTINCT different from a group by clause?

This restriction of group by you mention is also true for vfp9beta,
but the Select works there...

select alltrim(badrs) from emp group by badrs
also works in vfp9beta

select alltrim(badrs) from emp order by badrs
also works in vfp9beta

select alltrim(badrs), bdrs from emp group by badrs
also works in vfp9beta

Bye, Olaf.



Re: Why comes such error? by Anders

Anders
Wed Jan 12 09:56:27 CST 2005

This is a multi-part message in MIME format.

------=_NextPart_000_0122_01C4F8C7.A85B42B0
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

If badrs is a Memo type field the query is illegal. because you're not =
allowed to order by a Memo field.=20
The DISTINCT is allowed and will also actually order the rows.=20
If badrs is a Char field the query is perfectly ok. There must be some =
additional problem.=20
This hasn't changed since VFP7 at least.=20
-Anders=20
=20
"chuen" <cnchuen@hotmail.com> wrote in message =
news:uSsh$0J#EHA.1396@tk2msftngp13.phx.gbl...
In vfp8 or former version, I can use the following sql sentences:

Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor =
TempCurs
*/* Badrs is one field of table emp

But in vfp9, It's a wrong sentences?
Why vfp9 hv such difference from the former version?

Best Regards

Chuen


------=_NextPart_000_0122_01C4F8C7.A85B42B0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DTahoma>If badrs is a Memo type field the query is =
illegal.=20
because you're not allowed to order by a Memo field. </FONT></DIV>
<DIV><FONT face=3DTahoma>The DISTINCT is allowed and will also actually =
order the=20
rows. </FONT></DIV>
<DIV><FONT face=3DTahoma>If badrs is a Char field&nbsp;the query =
is&nbsp;perfectly=20
ok. There must be some additional problem. </FONT></DIV>
<DIV><FONT face=3DTahoma>
<DIV><FONT face=3DTahoma>This hasn't changed since VFP7&nbsp;at least.=20
</FONT></DIV>-Anders </FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"chuen" &lt;<A=20
href=3D"mailto:cnchuen@hotmail.com">cnchuen@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:uSsh$0J#EHA.1396@tk2msftngp13.phx.gbl">news:uSsh$0J#EHA.1396=
@tk2msftngp13.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>In vfp8 or former version, I can use =
the=20
following sql sentences:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2>Select distinct =
Alltrim(Badrs) From=20
Emp Order By Badrs Into Cursor TempCurs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*/* Badrs is one field of table =
emp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But in vfp9, It's a wrong =
sentences?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why vfp9 hv such difference from the =
former=20
version?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Chuen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0122_01C4F8C7.A85B42B0--


Re: Why comes such error? by Olaf

Olaf
Wed Jan 12 15:06:10 CST 2005


>SELECT ALLTRIM(field) is generally a bad idea, because the size of the field in the resulting table varies with the data.
True, but with SET VARCHARMAPPING ON vfp9 will automagically make it a varchar field.

I've tried the select with same data that would have
leaded to a c(1) field with longer strings following, but
nothing was cut off.

I read, that the default setting of VARCHARMAPPING was
changed between vfp9beta and release version.

But in vfp9beta this setting makes no difference.

Bye, Olaf.



Re: Why comes such error? by Anders

Anders
Wed Jan 12 15:59:48 CST 2005

This is a multi-part message in MIME format.

------=_NextPart_000_0140_01C4F8FA.6A388D20
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

Hi Chuen=20
There's is a behavior change in VFP with SET ENGINEBEHEVIOR 90.=20
This the the rule:=20
A SELECT - SQL Command containing DISTINCT and ORDER BY clauses in which =
the ORDER BY field is not in the SELECT field list will generate an =
error in Visual FoxPro 9.0 with SET ENGINEBEHAVIOR 90 (Error 1808: SQL: =
ORDER BY clause is invalid.).=20
end rule
The solution is to use a field alias which is different from the field =
name:
Select distinct Alltrim(Badrs) badrs1 From Emp Order By Badrs1 Into =
Cursor TempCurs
or you can SET ENGINEBEHAVIOR 80 for this query.=20
or you can use a column ordinal instead of a column name:
Select distinct Alltrim(Badrs) From Emp Order By 2 Into Cursor TempCurs
-Anders=20


"chuen" <cnchuen@hotmail.com> wrote in message =
news:uSsh$0J#EHA.1396@tk2msftngp13.phx.gbl...
In vfp8 or former version, I can use the following sql sentences:

Select distinct Alltrim(Badrs) From Emp Order By Badrs Into Cursor =
TempCurs
*/* Badrs is one field of table emp

But in vfp9, It's a wrong sentences?
Why vfp9 hv such difference from the former version?

Best Regards

Chuen


------=_NextPart_000_0140_01C4F8FA.6A388D20
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DTahoma>Hi Chuen </FONT></DIV>
<DIV><FONT face=3DTahoma>There's is a behavior change in VFP with SET=20
ENGINEBEHEVIOR 90. </FONT></DIV>
<DIV><FONT face=3DTahoma>This the the rule: </FONT></DIV>
<DIV><EM>A </EM><A=20
href=3D"/html/815f7265-4dfd-40b9-8f19-0673b5a48847.htm"><EM>SELECT - SQL =

Command</EM></A><EM> containing DISTINCT and ORDER BY clauses in which =
the ORDER=20
BY field is not in the SELECT field list will generate an error in =
Visual FoxPro=20
9.0 with SET ENGINEBEHAVIOR 90 (Error 1808: SQL: ORDER BY clause is =
invalid.).=20
</EM><BR><FONT face=3DTahoma>end rule</FONT></DIV>
<DIV><FONT face=3DTahoma>The solution is to use a field alias which is =
different=20
from the field name:</FONT></DIV>
<DIV><FONT face=3DArial color=3D#800000>Select distinct Alltrim(Badrs) =
badrs1 From=20
Emp Order By Badrs1 Into Cursor TempCurs</FONT></DIV>
<DIV><FONT face=3DArial>or you can SET ENGINEBEHAVIOR 80 for this query. =

</FONT></DIV>
<DIV><FONT face=3DArial>or you can use a&nbsp;column ordinal instead of =
a column=20
name:</FONT></DIV>
<DIV><FONT face=3DArial>
<DIV><FONT face=3DArial color=3D#800000>Select distinct =
Alltrim(Badrs)&nbsp; From=20
Emp Order By&nbsp;2 Into Cursor TempCurs</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial>-Anders </FONT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"chuen" &lt;<A=20
href=3D"mailto:cnchuen@hotmail.com">cnchuen@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:uSsh$0J#EHA.1396@tk2msftngp13.phx.gbl">news:uSsh$0J#EHA.1396=
@tk2msftngp13.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>In vfp8 or former version, I can use =
the=20
following sql sentences:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2>Select distinct =
Alltrim(Badrs) From=20
Emp Order By Badrs Into Cursor TempCurs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*/* Badrs is one field of table =
emp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But in vfp9, It's a wrong =
sentences?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why vfp9 hv such difference from the =
former=20
version?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Chuen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0140_01C4F8FA.6A388D20--


Re: Why comes such error? by Olaf

Olaf
Thu Jan 13 05:26:17 CST 2005

Hi Anders,


>There's is a behavior change in VFP with SET ENGINEBEHEVIOR 90.
>This the the rule:
>A SELECT - SQL Command containing DISTINCT and ORDER BY clauses in which the ORDER BY field is not in the SELECT field list will
>generate an >error in Visual FoxPro 9.0 with SET ENGINEBEHAVIOR 90 (Error 1808: SQL: ORDER BY clause is invalid.).
>end rule
>The solution is to use a field alias which is different from the field name:
>Select distinct Alltrim(Badrs) badrs1 From Emp Order By Badrs1 Into Cursor TempCurs
>or you can SET ENGINEBEHAVIOR 80 for this query.
>or you can use a column ordinal instead of a column name:
>Select distinct Alltrim(Badrs) From Emp Order By 2 Into Cursor TempCurs

perhaps
Select distinct Alltrim(Badrs) From Emp Order By 1 Into Cursor TempCurs
or

Select distinct Alltrim(Badrs) , Badrs From Emp Order By 2 Into Cursor TempCurs

Anyway, I'd say this is it, has nothing to do with
the behaviour change of GROUP BY since vfp8.

Thanks for the solution,
Bye, Olaf.



Re: Why comes such error? by Anders

Anders
Thu Jan 13 14:37:56 CST 2005

Hi Olaf
Nothing to do with GROUP BY, agreed.
-Anders

"Olaf Doschke" <T2xhZi5Eb3NjaGtlQFNldG1pY3MuZGU@strconv.14> wrote in message
news:OMW3VNW#EHA.3376@TK2MSFTNGP12.phx.gbl...
> Hi Anders,
>
>
> >There's is a behavior change in VFP with SET ENGINEBEHEVIOR 90.
> >This the the rule:
> >A SELECT - SQL Command containing DISTINCT and ORDER BY clauses in which
the ORDER BY field is not in the SELECT field list will
> >generate an >error in Visual FoxPro 9.0 with SET ENGINEBEHAVIOR 90 (Error
1808: SQL: ORDER BY clause is invalid.).
> >end rule
> >The solution is to use a field alias which is different from the field
name:
> >Select distinct Alltrim(Badrs) badrs1 From Emp Order By Badrs1 Into
Cursor TempCurs
> >or you can SET ENGINEBEHAVIOR 80 for this query.
> >or you can use a column ordinal instead of a column name:
> >Select distinct Alltrim(Badrs) From Emp Order By 2 Into Cursor TempCurs
>
> perhaps
> Select distinct Alltrim(Badrs) From Emp Order By 1 Into Cursor TempCurs
> or
>
> Select distinct Alltrim(Badrs) , Badrs From Emp Order By 2 Into Cursor
TempCurs
>
> Anyway, I'd say this is it, has nothing to do with
> the behaviour change of GROUP BY since vfp8.
>
> Thanks for the solution,
> Bye, Olaf.
>
>


Re: Why comes such error? by Olaf

Olaf
Fri Jan 14 09:57:47 CST 2005

Hi Anders,

> Nothing to do with GROUP BY, agreed.
Okay, that was more in the direction of Rick,
but now we're two...

Bye Olaf.