Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SQL statement
Message
De
23/12/2003 16:43:18
 
 
À
22/12/2003 20:14:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00861465
Message ID:
00861770
Vues:
21
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform