Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SPT code
Message
From
07/08/2002 08:33:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Help with SPT code
Miscellaneous
Thread ID:
00686974
Message ID:
00686974
Views:
79
I need a way to run an SPT statement(AS400) and then use the result to run a second SPT.

For example: I am looking for hardware that is listed by several base numbers. Each base number has multiple lines for a description so one pass through won't get the result I need. Say my parameter is 'SCREW'. I run the first SPT to get all the base numbers that have screw in the description. Then I need to take these numbers and do a second SPT to get the multiple records that go with these numbers.

Right now I can get this second SPT to work provided it only has a few numbers to look at. This is because of the string limitation. What I do is loop through the first result creating a string "'WAXXX' Or 'WAXX1' Or 'WAXX2' Or 'WAXX3'" etc. I then use this in my SPT as this:
= SQLPREPARE(gnHandle1, "Select * From wamtxt Where &mfrt2b", 'mySeeThis1')

I need a way to break this string into smaller strings which I know how to do with separate variables but not a single string.
Next
Reply
Map
View

Click here to load this message in the networking platform