Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RECNO() and sql select
Message
From
24/11/2006 05:48:54
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
24/11/2006 04:05:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01172207
Message ID:
01172228
Views:
14
Kevin,

the use of RECNO() and anything bound to ALIAS() is not recommended in SELECT SQL. But you can trick it
Add an extra column to your table, fill with the RECNO() and use this as as temp key
USE YourTable exclusive
ALTER TABLE YourTable ADD COLUMN iTempKey I

REPLACE;
iTempKey WITH RECNO()

*do your work

ALTER TABLE YourTable DROP COLUMN
HTH
Agnes
>Hi
>
>When you use recno() in select statements, is it reliable?
>
>In some old Fox2.6 apps we have duplicate keys and I need to differentiate between them.
>
>Thanks
>Kev
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform