Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select from TEMPXXX
Message
 
To
14/02/2005 15:33:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00986780
Message ID:
00988693
Views:
40
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform