Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'number' as a field name
Message
From
01/09/1997 15:02:59
 
 
To
01/09/1997 12:32:44
Glenn Mcburney
Doe(Ni) Information Systems Unit
Belfast, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00047940
Message ID:
00047950
Views:
22
I think the problem is the RECNO() function, not the name of the field. Don't use RECNO() with a SELECT SQL on more than one table. The same goes for other VFP functions (like DELETE() for ex.). Basically, you don't know what happens inside the SELECT SQL. So, the result of these functions is undetermined.

To be more clear: using such functions with no parameter for alias means they are applied for the current work area, but you don't know which is the current area at every moment inside SELECT SQL. If you specify the alias as the parameter for the function, it will be applied to the alias you already have, not to the table (which is open again) inside SELECT SQL.

If you really need to use a function like that, first SELECT from one table. In this way you have the info you want as a field in the result. After that you can join this result with your other tables using another SELECT. This will give you the correct result.

HTH,
Vlad

>I was working with a view which links two tables, when ran it was not joining the correct records.
>The linked field in the first table (staff) was called 'number' and as it is a reserved word seemed to be the cause.
>
>BTW I deny responsibility for this debacle as the database was created before my time.
>
>The thing is a Select on Staff.Number returned the record whose Recno equalled it.
>Is this another way to reference Recno or has the reserved word usage just sent things haywire ?
>
>I'll probably not read any comments on this for several weeks as I'm off to change all references to staff.number in this whole system !
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform