Query doing string math instead of numeric with LT

69 views
Skip to first unread message

Joyce White

unread,
Jan 9, 2020, 4:24:51 PM1/9/20
to jBASE
I have a jBASE program that does record selection using a query such as this: SELECT X WITH BALANCE LT QUANTITY
BALANCE and QUANTITY are data dictionary-defined fields for fields 1 & 2. My issue is this - the query is doing string math instead of number math. For instance, 2 LT 9 evaluates as true, 2 LT 10 does NOT evaluate as true.

How can I define my fields OR change the query so my query selection compares these values numerically instead of as strings?

Thanks!
Joyce

pfalson

unread,
Jan 9, 2020, 4:41:02 PM1/9/20
to jBASE
Are all these dictionaries R-just?

Joshua Camacho

unread,
Jan 10, 2020, 6:47:36 AM1/10/20
to jb...@googlegroups.com
Dictionaries that are R justified will be assumed mathematical; dictionaries that are L justified will be treated as strings. 

Hope this helps!

Josh C

--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

---
You received this message because you are subscribed to the Google Groups "jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbase+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/d5c0e42d-28a9-4774-af4d-7ddbbf5dd2fd%40googlegroups.com.
--

brucew...@comcast.net

unread,
Jan 10, 2020, 6:47:36 AM1/10/20
to jb...@googlegroups.com

Hi Joyce:

 

Check the justification in those Dictionary items. They should both be Right-justified.

--

Joyce White

unread,
Jan 10, 2020, 8:58:34 AM1/10/20
to jBASE
Wow, thank you so much! You are absolutely correct, both of my dictionary definitions were Left-justified. I changed them to Right-justified and now they are treated numerically! Yay! Thanks, all! You're lifesavers!

Dick Thiot

unread,
Jan 10, 2020, 11:17:39 AM1/10/20
to jb...@googlegroups.com
Joyce,

Word of caution...  You should be aware that changing the existing dictionary itemss could have an effect on the way other parts of your application work if they are using those same items.  If you created new ones then you shouldn't have any problems.

Dick

--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

---
You received this message because you are subscribed to the Google Groups "jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbase+un...@googlegroups.com.

Joyce White

unread,
Jan 10, 2020, 2:47:25 PM1/10/20
to jBASE
Dick,
   Thanks for the warning - I hadn't considered that changing the justification could have a negative effect. These ARE existing items, but they are both numeric fields (or meant to be) only and the values are not used in reporting anywhere, so I think I should be good. Is that what you meant by having an effect -that another part of the program might be expecting them to act like strings? I'll scan through the code and see where they're used, just to be sure.
   Thank you!
         Joyce
To unsubscribe from this group and stop receiving emails from it, send an email to jb...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages