Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change the WHERE Expression on the fly
Message
De
04/12/1999 12:58:26
 
 
À
04/12/1999 10:55:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00298657
Message ID:
00298694
Vues:
12
>>Hi,
>>
>>Is there a away to change the WHERE expression without
>>creating the entire view ? (I could not find any)
>>
>>I have a Notes form, that need to serve 2 other forms like supplier
>>and one for distributor. If I use the same view for both forms then I
>>need to change the filter expression on the fly ?
>>
>>I could NOT see away to do it with DBSETPROP() as of now.
>>
>>I would need to change the actual field it instead of :
>>
>> WHERE Notes.idis_sysid = ?ParentPKValue
>>
>>To:
>>
>> WHERE Notes.iPub_sysid = ?ParentPKValue
>>
>>Thanks
>>
>>Doron
>
>Personally, I would not do it, but it's doable
>cWherestring='Notes.iPub_sysid = ?ParentPKValue'
>create sql view myview as select * from notes where &cWherestring.

Ed, this is going to resolve the macro-expansion at the time of the CREATE SQL VIEW - he'd really have to use WHERE EVAL(wherestring), even uglier as far as performance. He'd be better off creating a new view dynamically, or creating several parameterized views to accomplish this.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform