Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > & Removal in Ex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 801 of 852
Post > Topic >>

& Removal in Expressions

by Gene Wirchenko <genew@[EMAIL PROTECTED] > Aug 23, 2007 at 12:48 PM

I frequently build expressions for use in xBASE and SQL
statements.  For example:

      do case
      case !empty(this.datefrom) and !empty(this.dateto)
         dateexpwo="(trndtlow>=this.datefrom and
trndthi<=this.dateto)"
         dateexpol=;
          "((trndtlow<this.datefrom and this.datefrom<trndthi) or "+;
          "(trndtlow<this.dateto and this.dateto<trndthi))"
      case !empty(this.datefrom) and empty(this.dateto)
         dateexpwo="(trndtlow>=this.datefrom)"
         dateexpol="(trndtlow<this.datefrom and
this.datefrom<trndthi)"
      case empty(this.datefrom) and !empty(this.dateto)
         dateexpwo="(trndthi<=this.dateto)"
         dateexpol="(trndtlow<this.dateto and this.dateto<trndthi)"
      case empty(this.datefrom) and empty(this.dateto)
         dateexpwo=".t."
         dateexpol=".f."     && Overlap with ends is impossible if no
ends!
         endcase

      . . .

      select . . .
      where;
       wostatus="B" and &dateexpwo and . . .

     Short of writing four SQL selects for the above case, is there
any way to get rid of the & use ("&dateexpwo")?

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
     I have preferences.
     You have biases.
     He/She has prejudices.
 




 8 Posts in Topic:
& Removal in Expressions
Gene Wirchenko <genew@  2007-08-23 12:48:42 
Re: & Removal in Expressions
"Lew" <lew@[  2007-08-23 16:18:39 
Re: & Removal in Expressions
"Cathy Pountney"  2007-08-23 18:57:46 
Re: & Removal in Expressions
Thomas Ganss <tganss_a  2007-08-25 13:20:29 
Re: & Removal in Expressions
Bernhard Sander <fuchs  2007-08-24 10:12:33 
Re: & Removal in Expressions
Gene Wirchenko <genew@  2007-08-24 09:13:25 
Re: & Removal in Expressions
Cy Welch <cywelch@[EMA  2007-08-26 09:15:16 
Re: & Removal in Expressions
Gene Wirchenko <genew@  2007-08-27 11:59:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 0:50:00 CDT 2008.