Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SQL statement
Message
From
23/12/2003 16:43:18
 
 
To
22/12/2003 20:14:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00861465
Message ID:
00861770
Views:
22
>I know.. makes you look crosseyed...:)
>
>I'm green to SQL Server but do you know if you can do something like
>
>select *, iif(q1a >2 ,1,0) as q1a_val ..etc from mytable into cursor q1
>
>select * from q1 where q1a + q1b +q1c + q1d >=2
>
>??
>
>kinda roundabout but would be a little simpler...

this is what i was trying to think of before...
select *
  from mytable
  where (sign(q1a-2.5) + sign(q1b-2.5) + sign(q1c-2.5) + sign(q1d-2.5) >= 0
      or sign(q2a-2.5) + sign(q2b-2.5) + sign(q2c-2.5) + sign(q2d-2.5) >= 0)
works in both vfp and sql server, too
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform