Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL: ORDER BY clause is invalid
Message
From
01/04/2005 11:12:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/04/2005 11:07:05
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01000629
Message ID:
01000694
Views:
24
>>This used to work fine in vfp3
>>
>>select distinct last_name, first_name, mid_name, ;
>>  address1, address2, city, state, zip_code, ;
>>  ' ' as packet_id,ssn, right(a.ssn,4) as ssno ;
>>  from temp ;
>>  into cursor address ;
>>  order by ssno, ssn
>>
>>How to fix in vfp9 besides making two statements?
>>How to find all like this in code?
>
>Doug,
>
>
>select distinct last_name, first_name, mid_name, ;
>  address1, address2, city, state, zip_code, ;
>  ' ' as packet_id,ssn, right(a.ssn,4) as ssno ;
>  from temp ;
>  into cursor address ;
>  order by 11, 10
>
>
>The ORDER BY fields have to exist in your table to reference them by name and ssno doesn't.
>
>Regards,

Jim,
It's a bug IMHO. ssno need not be in base table as long as it's in cursor.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform