Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Assistance With SQL Command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01305489
Message ID:
01305631
Views:
6
>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;
>
>
>
>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?

I didn't read the whole thread yet, but one thing immediatelly caught my attention - you can not use deleted() function if there are more than 1 tables in the FROM clause.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform