Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10498

Problem passing a hyphen in a formula

$
0
0

I have written the following custom formula in Crystal Reports.  There are hundreds of fields with the matching text, but only the first case will work ($0).  This leads me to believe that the hyphen is causing problems with the equation.

 

Function (stringvar field)

 

select field

 

case "$0" : 0

case "$1-$5,000" : 5000

case "$5,001-$10,000" : 10000

case "$10,001-$25,000" : 25000

 

I tried writing the following bit of SQL, and sure enough, the field cannot be found in the DB.

 

SELECT currencyRangeColumn FROM table

WHERE currencyRangeColumn = "$1-$5,000"

 

However the following SQL command works.  How can I use it in this function with Crystal?

 

SELECT currencyRangeColumn FROM table

WHERE currencyRangeColumn like "$5,001&"


Viewing all articles
Browse latest Browse all 10498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>