Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test with sql
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00185305
Message ID:
00185442
Vues:
21
Ehhhr Michelle?

Philip is right. SQL accepts the ?. Wonder what that does to _our_ egoes :). And Philip, thanks for straightening us out.

Philip, notwithstanding your relevant remarks about the use of *, sql accepts the creation of columns after a * clause.

We're back to square one.

Marc



>>Hey
>>
>>I want make a test in the command windows.
>>
>>1) I open the table in my deta session
>>2) I put a date in my var
>>
>>When i try this. Error Operator/operand typy mismatch
>>
>>3) SELECT *, .T. AS cFlag FROM hold WHERE between(hold.date_prod,
>> Date1, ?Date2)AND !DELETED() INTO CURSOR tmpHold
>>
>>Where is my problem, behind the keyboard I know
>
>Hi Pierre,
>
>The question mark before the Date2 parameter is perfectly acceptable. This is not where the problem is, provided the "date var" you are populated with a valid date value is Date2. The problem could be related to your mixinf the * with a column assignment statement in the SQL syntax. I don't think you are allowed to mix a "SELECT *..." with a column creation statement like ".T. as tFlag".
>
>Try issuing the required field name list with the select statement, as in
>
>SELECT firstname, lastname, date_prod, .T. as tFlag FROM hold INTO...
>
>You get the idea. Also, if you are not using *every* field in the result cursor, avoid using the "SELECT *..." approach. When you start dealing with larger record sets, select statements that grab all fields tend to be quite slow, as only the indexed fields are optimizable in the SELECT statement by Rushmore. The difference in query processing time would surprise you.
>
>Phil

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform