Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT Joining on Delimited Field
Message
From
19/05/2010 08:48:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SPT Joining on Delimited Field
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01465091
Message ID:
01465091
Views:
98
I have one table that has a workcenter field and a description field(unique records).

Example:

wkc1 wkc1description
wkc2 wkc2description
wkc3 wkc3description
wkc14 wkc4description


My second table has a userid field and a workcenter monitor field. The work center monitor field is a delimited string

SDE wkc1
XYZ wkc2,wck4
ZYX wkc1,wkc2,wkc4

How can I join these tables so I get a list of all workcenters and the userid(where there is a match) that is monitoring that workcenter.
The following on gives a match where there is only one workcenter in the second table workcenter monitor field.
testconnString = "Select Distinct amflib7.routng.wkctr, wcdsc From amflib7.routng" +;
" Join amflib7.wrkctr On amflib7.wrkctr.wkctr = amflib7.routng.wkctr" +;
" Join webprddt7.resmngt10 On webprddt7.resmngt10.userp8 = amflib7.routng.wkctr" +;
" Where amflib7.routng.wkctr Not In('RMS','NOTES','INSP') Order By wcdsc"
Next
Reply
Map
View

Click here to load this message in the networking platform