Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
What you are trying to do is one of the problems with the view designer. However it is possible to create a view through code that will do want you want.
Here is a simple example that will work.
* Create the view with the parameterized string
CREATE SQL VIEW "MyView" ;
AS SELECT * FROM temp!item WHERE item IN (&?lcString)
* Now to run the view
* Concat all indiviual parameters as a string
lcString = "'00002','00003','00009'"
USE MyView
SELECT MyView
BROWSE
The downside to this approach is that when you try to modify the view in the view designer, you get a Syntax Error. This is the reason why we don't use view designer, instead we create all database objects through code and save the code as part of the project. If we need to modify the view, then we can modify it in the code and recreate the view.
Hope this helps.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement