Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test with sql
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00185305
Message ID:
00185441
Views:
16
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform