Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - BLUES
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00146533
Message ID:
00146631
Views:
23
It would not have worked in the Command Window if the SQL required table aliases on the fields. Fox tells you right away when a field is not unique in a query.

What do you mean about 'no assurance' as to which table is open? If the tables are opened prior to the SQL, then Fox utilizes those; otherwise, it would search along your path settings to open the tables specified in the FROM clause.

I just had to respond because I've never seen a useful response from you...

>Hi, Marc. Here's a WAG < s >
>Does it help to prefix all the field names with the table names? I guess I've always heard that that is safest. Since it works in the command window, you're sure of which tables are opened where. When you just execute the sql statement I believe you have no assurance as to which table is open where.
>
>>
>>select virtual.*, iif(V_Weight=0,0,v_Value/v_weight) as price;
>>   from Virtual,Stock,Sale;
>>   where stk_Parcel=V_Stock;
>>   and sal_Docnr= stk_docnr;
>>   and V_Box= cKey;
>>   and V_Status= hStk_Sale;
>>   into cursor glSold
>>
>>
>>This works 1) when I open the files and executed it in the command window. 2) from the program if I leave out the iif statement, and 3) it worked yesterday :).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform