General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Bruce,
Try:
- Not use SELECT *
Do like this: SELECT keyfield ....
Check out results!
- OR do the follwing:
SELECT keyfield from table1 into array1
SELECT keyfield from table2 into array2
LinesNumber1 = Alen(array1, 1)
LinesNumber2 = Alen(array2, 1)
Dimension NewArray(LinesNumber1, 1)
k = 0
For i = 1 to LinesNumber1
For j = 1 to LinesNumber2
FindTopic = Ascan(array1, array2(j))
If FindTopic > 0
k = k + 1
NewArray(k)= FindTopic
* Or create a string
strFind = strFind + array1(FindTopic) + ","
Endif
Next j
Next i
* At the array NEWARRAY you have your result,
* now you can make the query again to retrieve the date you want.
* or you can use the string, and associate to a SQL statement using IN
strFind = Substr(strFind, 1, Len(strFind)-1) && Take off the last comma
Select * from table1
where keyfield in (strFind)
That should handle! Check results! Say something, OK?
Cheers,
Ricardo
Previous
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