Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'File does not exist.' ???
Message
 
To
31/01/2005 12:11:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
00982303
Message ID:
00982329
Views:
37
>Any suggestions on alternatives would be welcome. (Note that I want to use COPY TO, instead of SELECT, because of the current filter, if any -- which SELECT would ignore.)

Other way is to Build SELECT Command :o)))

Something like:
  m_select = "SELECT Field1"
  FOR EACH ....
      Your checks here to add desired fields
  NEXT
  SELECT YourMainTable
  cFilter = SET("Filter")
  IF .NOT. EMPTY(cFilter)
     m_select = m_select + " WHERE "+cFilter
  ENDIF
  m_select = m_select + " INTO ..."
  &cSelect
*** Update: I forgot FROM clause
  m_select = "SELECT Field1"
  FOR EACH ....
      Your checks here to add desired fields
  NEXT
  SELECT YourMainTable
  m_select = m_select + " FROM YourMaintable "
  cFilter = SET("Filter")
  IF .NOT. EMPTY(cFilter)
     m_select = m_select + " WHERE "+cFilter
  ENDIF
  m_select = m_select + " INTO ..."
  &cSelect
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform