Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized views
Message
From
25/11/2001 04:57:02
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italy
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Parameterized views
Miscellaneous
Thread ID:
00585474
Message ID:
00585474
Views:
42
I have the need to access a not predermined number of records using a parameterized view, with a single REQUERY().

The simplest view could be the following:
SELECT * FROM prdatab1!orderRows WHERE orderRows.id IN (?lnIDs)

No problem if lnIDs represents a single ID (i.e. 3).

Problems begin when records to extract are 2 or more: i.e. records with ID= 3,5,7

I tried to use an array to store the IDs to download:
DIMENSION lnIDs[3]
lnIDs[1] = 3
lnIDs[2] = 5
lnIDs[3] = 7
and then requery; but only the record with ID = 3 is extracted.

With a second attempt, I've created a view like that:
SELECT *;
FROM prdatab1!pr1ordcr;
WHERE Pr1ordcr.id IN (SELECT id FROM TempCursXView)

Before the requery I fill the records of TempCursXView with:
id = 3 (record 1)
id = 5 (record 2)
id = 7 (record 3)

This works, but when I try to re-open the view with the designer I get the error "SQL expression is too complex".

Is there a way to obtain the result in a more comfortable way?
Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform