Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flexible search/find form?
Message
 
To
04/01/1999 09:33:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172137
Message ID:
00172400
Views:
35
Hi Denise,

>Having the always true condition in there just saves me from having to figure out later where I need to put a where.

I usually use something like this:
  lcWhere = ""
  IF some condition
     IF NOT EMPTY(m.lcWhere)
        lcWhere = m.lcWhere + " AND "
     ENDIF
     lcWhere = lcWhere + "some condition"
  ENDIF
  IF NOT EMPTY(m.lcWhere)
     lcWhere = "WHERE " + m.lcWhere
  ENDIF
  SELECT fields FROM table &lcWhere INTO...
Christof
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform