Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with ==
Message
De
02/07/2002 06:50:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/07/2002 06:03:12
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00674353
Message ID:
00674370
Vues:
23
>Hi All,
>
>I ave a Problem with the '==' Operator in the SELECT SQL.
>
>My problem is, I have somewher a filter that is set like
>
>SET FILTER TO Field==myVal
>
>
>EXACT is OFF, ANSI is OFF
>
>Now I need to create a SQL SELECT that holds the same records as the filtered table.
>
>if I use something like
>
>lcWhere = IIF(EMPTY(FILTER(),'','WHERE '+FILTER())
>SELECT *;
> FROM MyTable;
> &lcWhere
>
>
>This gives possibly different results because the "==" Operator is differnt for SELECT SQL and any other place.
>
>So I'm thinking about, but could not find a good solution. Replace '==' with "=" and SET ANSI ON will mix up all original "=" statements.
>Using LIKE(MyVal,Filed) works fine - until somebody adds a wildcard to the myVal ...
>
>I run out on ideas on this.
>
>Please help me
>
>Agnes

Agnes,
Yes == in SQL is different and shortcut for Set Ansi On. However why should that be a problem :
set filter to myField == myVal

If myVal is not the same size as the field itself filtering would be selecting no records, something like 'set filter to .f.'

IOW it's the filter causing problem there not the SQL.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform