Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECTing Correct FieldNames
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SELECTing Correct FieldNames
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
00995349
Message ID:
00995349
Vues:
51
I have the following two SQL statements:
 DO CASE
   CASE lcFilter = "Contains"  && A case-INsensitive "contains" search.
	 SELECT &lcSearchField,* FROM &srTable WHERE custid = srCustid AND ;
         UPPER(srOtherData) $ UPPER(&lcSearchField) INTO CURSOR csrOther
	 srView = "csrOther"

   CASE ThisForm.cboFilter.Value = "Exact"  && A case-INsensitive "exact" search.
	 SELECT &lcSearchField,* FROM &srTable WHERE custid = srCustid AND ;
	 UPPER(srOtherData) == UPPER(&lcSearchField) INTO CURSOR csrOther
	 srView = "csrOther"
 ENDCASE
My SELECT statements start out as " SELECT &lcSearchField,* ", because I want the resulting cursor to display the "&lcSearchField" in the first position ONLY, and not a second time with a suffix of "_b"(example: Manufactur_a and a second time as Manufactur_b). These two SELECT statements are used to search various tables, depending on what the user sets the Search Form to.

Do I need to manually build an SQL statement using an Array built with AFIELDS() and concatenation? Or is there a better way?

Thank you.
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform