jBASE EVAL Help?

196 views
Skip to first unread message

Joyce White

unread,
Jan 9, 2020, 4:24:51 PM1/9/20
to jBASE
Hi, I'm trying to use the EVAL jBASE expression and am not finding any documentation anywhere on it. Can anyone please provide me with some help using EVAL? I just want to understand exactly what it's doing.
Thanks,
Joyce

pfalson

unread,
Jan 9, 2020, 4:38:11 PM1/9/20
to jBASE
EVAL “expression” [as alias]

eg. LIST myfile EVAL "@ID[1,3] AS FIRST_THREE

Joyce White

unread,
Jan 10, 2020, 4:29:14 PM1/10/20
to jBASE
Thanks, pfalson! My use of it is more in a query, like below:
SELECT X WITH EVAL "BALANCE LT QUANTITY" = "1"
SELECT X WITH EVAL "BALANCE LT QUANTITY" = 1
   It seems like it's just evaluating for true/false, and expecting 1/0 as the response. But I ran into a few curious things.
1) If I put quotes around the "1", it brings back all that are true.
2) If I DON'T put quotes around the 1, it brings back only the ones with a difference of 1....but it also brings back the ones where both are 0.
3) If I use 2 at the end, I get the following:
Balance.  Quantity
1                    4
1                    2
0                    0

4) It doesn't seem to work with any other numbers at the end. Brings back nothing.
Can you explain exactly HOW it is evaluating? I'm just curious.
Thanks!
Joyce

Peter Falson

unread,
Jan 10, 2020, 4:42:35 PM1/10/20
to jb...@googlegroups.com
Add an AS <some col name> before your =

SELECT X WITH EVAL "BALANCE LT QUANTITY" AS balLTqty = "1"

Sent from my iPhone

On Jan 10, 2020, at 1:29 PM, Joyce White <joycew...@gmail.com> wrote:


--
--
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/9bf7c3e0-6358-4be0-afb3-cf33811004be%40googlegroups.com.

Mvreply

unread,
Jan 10, 2020, 5:30:53 PM1/10/20
to jb...@googlegroups.com

Joyce,

> Can you explain exactly HOW it is evaluating? I'm just curious.

If you require in-depth feedback on this, can you please submit a ticket to dev...@jbase.com on behalf of your company?

 

Thanks,

Mike

--

Reply all
Reply to author
Forward
0 new messages