Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select from TEMPXXX
Message
 
À
14/02/2005 15:33:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00986780
Message ID:
00988693
Vues:
41
I am not sure what You want but see if this works for You:
SELECT tempxxx
fl_execute = .f.
IF RECCOUNT() > 0
   lcSelectSQL = "SELECT DISTINCT hier.account_code as account " + ;
                        "FROM h_node hnode, hierarchy hier " + ;
                        "WHERE hier.hcode  = hnode.hcode AND ("
  SCAN FOR INLIST(tempxxx.hcode, 55555, 66666)
       lcSelectSQL = lcSelectSQL + IIF(fl_execute, " OR ","") + "hier.hcode = '" + tempxxx.hcode + "'"
       fl_execute = .t.
  ENDSCAN
  IF fl_execute
     lcSelectSQL = lcSelectSQL + ")"
     lnExec = SQLEXEC(lnconnect,lcSelectSql,'temptodelete')
   ENDIF
ENDIF
=sqldisconnect(lnconnect)

IF fl_execute
   SELECT temptodelete
   BROWSE
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform