Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameterized views
Message
De
25/11/2001 04:57:02
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Parameterized views
Divers
Thread ID:
00585474
Message ID:
00585474
Vues:
43
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform