Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement
Message
 
To
11/05/2005 11:29:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01012914
Message ID:
01012922
Views:
25
There are a number of ways to do it. Among them:
sele dist callrepid from callreport, actions where;
          actions.actionid$actionid1+" "+actionid2+" "....
or
sele dist actionid from actions into curs temp1
index on actionid tag actionid

sele callrepid from callreport where;
 indexseek(callreport.actionid1,.f.,"temp1","actionid") or;
 indexseek(callreport.actionid2,.f.,"temp1","actionid") or;
.....
The proper solution depends on the number of records in the tables, their size, etc...


>I have two tables as follows:
>
>callreport.dbf
>callrepid   actionid1  actionid2 ...  actionid10 ....
>
>
>actions.dbf
>actionid    action
>
>
>I need an sql statement that will produce a cursor containing only the callrepids from callreport.dbf that have an actionid (1-10) that is in the actions dbf.
>
>Hope this makes sense.
>
>Thanks in advance for your help!
Previous
Reply
Map
View

Click here to load this message in the networking platform