General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only