Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record not selected by a SQL query
Message
From
08/11/2018 06:51:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/11/2018 08:51:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01662848
Message ID:
01663199
Views:
56
>>Do not rely on functions like recno() and deleted() when there are more than one table in the query.
>
>What about RECNO("kartei") or when a specific alias is specified. Does it work then?
>
>
SELECT kartei.* , RECNO("kartei") as satznr, kunden.vorname, ;
>                  ^^^^^^^^^^^^^^^
>        kunden.name1, kunden.name2, kunden.name3, kunden.strasse, ;
>        kunden.plz, kunden.ort ;
>    FROM kartei ;
>        INNER JOIN kunden ON kartei.kundennr == kunden.kundennr ;
>    WHERE       kartei.vormerker ;
>        AND     kartei.nummer == this.cIsbn ;
>        AND NOT DELETED() ;
>    ORDER BY best_dat DESC ;
>    INTO CURSOR myvormerker READWRITE
>
No, as I said, never rely on recno() when it is not a single table in SQL. In one or more cases it might seem to work right, but I remember cases where it wouldn't. I just can't think of a good demo code right now.
Ç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