Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Assistance With SQL Command
Message
 
To
25/03/2008 17:51:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01305489
Message ID:
01305512
Views:
12
>>I have an app that has this query. Note the ASCAN() command:
>>
>>
>>SELECT rcm_pk, cmt_custname, rlc_number;
>>	FROM RailComp, RailCars, CustMast;
>>	WHERE rcm_rlc_fk = rlc_pk AND;
>>		  rcm_custcode = cmt_custcode AND;
>>		  NOT DELETED() AND;
>>		  NOT rlc_final_bill AND;
>>		  rlc_rectype = "R"  AND;
>>		  ASCAN(laCustCode,custmast.cmt_custcode,1) > 0;
>>	ORDER BY rcm_custcode, rlc_number, rcm_compdesc;
>>	INTO CURSOR WouSel;
>>
>>
>
>Just want to comment that ASCAN() in a query is a bad idea because it's controlled by SET EXACT, but the query's controlled by SET ANSI.
>
>
>>
>>I tried to change it to use a dynamically created cusstomer list, but I get a 'Line is too long' error when I
>>select all customers:
>>
>>
>>
>>SELECT rcm_pk, cmt_custname, rlc_number;
>>	FROM RailComp, RailCars, CustMast;
>>	WHERE rcm_rlc_fk = rlc_pk AND;
>>		  rcm_custcode = cmt_custcode AND;
>>		  NOT DELETED() AND;
>>		  NOT rlc_final_bill AND;
>>		  rlc_rectype = "R"  AND;
>>		  INLIST(rcm_custcode, 'ABCDE','ABL24','ACA30','ACM17');
>>	ORDER BY rcm_custcode, rlc_number, rcm_compdesc;
>>	INTO CURSOR WouSel;
>>
>>
>>Is there a way to do this with a join?
>
>Throw the list into a cursor and join the cursor.
>
>Tamar

Just got done doing that. It seems great minds DO think alike.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform