Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select with CASE statement
Message
 
 
To
28/01/2019 17:52:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01665779
Message ID:
01665783
Views:
43
>>Hi,
>>
>>I am going crazy as to why the following give an error:
>>
>>
>>select * from mytable where case when mytable.order_no > 0 then 1=1 else 1=0 end 
>>
>>
>>What is missing in the above?
>>
>>TIA
>
>
select * from mytable where mytable.order_no > 0
>
>PS: As with your previous query, you are going the wrong path, do not unnecessarily try to use case.

I agree I should have shown the real case. If you look at my reply to Sergey, you will see a little more of what I am trying to do. And maybe I should not be using the case. Hence I asked the question.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform