Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
About sql syntax (URGENT)
Message
De
22/01/2001 19:05:10
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00467002
Message ID:
00467058
Vues:
13
Kosta,

Your three questions are very different. You would do better to post them in separate threads.

I'll answer the first only. Assuming your combo has "All", "Male" and "Female".
cSQLStatement = ;
  [SELECT * FROM okul2 ] + ;
  [WHERE ] + ; 
  IIF(thisform.Combo1.value = "All", [.T. ], ;
  IIF(thisform.Combo1.value = "Male", [okul2.sex = "M" ], ;  
  [okul2.sex = "F" ])) + ; 
  [and okul2.ilce=thisform.Combo2.value ] + ;
  [and okul2.okul=thisform.Combo3.value ] + ;
  [and okul2.ozur=thisform.Combo4.value ] + ;
  [and okul2.zeka=thisform.Combo5.value ] + ;
  [and okul2.onlem=thisform.Combo6.value ] + ;
  [and okul2.devam=thisform.Combo7.value ] + ;
  [and okul2.iq>=thisform.Text1.value ] + ;
  [and okul2.iq<=thisform.Text2.value ] + ;
  [into cursor crsResult NOFILTER ]

&cSQLStatement

browse
Please note that square brackets are string delimiters in FoxPro. They really help in situations like this where you have internal quotes as well.



>Dear Sirs,
>
>I have some questions like under,
>
>1-I have a query on the form with 7 combobox and 1 textbox
>my combobox sources coming from various 6 dbf (all of rowsource=select distinct name from names into cursor combo1,...) (rowsource type 3-SQL statement) and there is no any record named 'ALL' my sql code like this in my command button
>
>SELECT * FROM okul2 WHERE; okul2.sex=thisform.Combo1.value;
>and okul2.ilce=thisform.Combo2.value ; &&coming from ilce.dbf
>and okul2.okul=thisform.Combo3.value ; &&coming from okullar.dbf
>and okul2.ozur=thisform.Combo4.value ; &&coming from ozur.dbf
>and okul2.zeka=thisform.Combo5.value ; &&coming from zeka.dbf
>and okul2.onlem=thisform.Combo6.value ; &&coming from onlem.dbf
>and okul2.devam=thisform.Combo7.value ; &&coming from devam.dbf
>and okul2.iq>=thisform.Text1.value ; and okul2.iq<=thisform.Text2.value ;
>into cursor crsResult NOFILTER
>brows
>
>when I wantto select for exp. for sex both of (M+F,male female 'ALL') for combo1
>or for the some others how should writte sql syntax
>
>2-how we can put bmp to the app menus
>
>3-how can put a registry control for max.50 run for my demo.exe or timebomb using activex,or how can I write "dll" for this matter.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform