Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a valid SQL expression
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00519051
Message ID:
00519125
Views:
17
and as long as Var1 is NEVER zero

You could change the expression to iif(var1 = 0, 0, 100/var1)

Cheers,

Andrew

>>I want to know if it is valid to put an expression on the left hand side of a relational operator in an SQL statement. Foxpro doesn't complain but an associate says it is worng and could produce questionable results.
>>Here is an example of what I am talking about.
>>
>>
>>
>>
>>select * from table1 where field1 * var1 >= 100 into cursor temp1
>>
>>
>>field1 is a numeric field in table1
>>var1 is a numeric variable
>
>You can rushmore optimize this if you changed it to WHERE Field1 >= 100/Var1 as long as you have an index on Field1


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Reply
Map
View

Click here to load this message in the networking platform