JOIN STATEMENT -jBase

57 views
Skip to first unread message

Prince Bismark

unread,
Jun 19, 2021, 2:14:26 PM6/19/21
to jb...@googlegroups.com
All,
I have two tables, CUSTOMER_BIO which contains all the bio data of the clients including PHONE_NUMBER and CUST_ID and the second table CLIENTS which contains CLIENT_ID, CUST_ID,SERVICE_TYPE.
I want to extract on CLIENTS TABLE, CLIENT_ID AND SERVICE_TYPE and PHONE_NUMBER

Any help?

Joshua Camacho

unread,
Jun 19, 2021, 4:01:58 PM6/19/21
to jb...@googlegroups.com
You will need to make a referencing dictionary entry on the CLIENTS table to the CUSTOMER_BIO table. Assuming that both tables have the same Key of Customer number, and that the phone number is stored on attribute 10 of the CUSTOMER_BIO record, the dictionary on the CLIENTS table would look like this:

DICT CLIENTS PHONE_NO

001 A
002 0
003 PHONE NO
004
005
006
007 TCUSTOMER_BIO;x;;10
008
009 L
010 11

It's the attribute in attr002 and the calculation in Attr007 that tells jBASE to fetch (T) from CUSTOMER_BIO, record 0 (attr2 of this dictionary), and return attribute 10. I'm not sure what the x and the extra semicolon do, but I know they need to be there.

This would allow you to run the following command, assuming that CLIENT_ID and SERVICE_TYPE exist as dictionary entries on CLIENTS table:

LIST CLIENTS CLIENT_ID SERVICE_TYPE PHONE_NO



--
--
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/CACwaXCnWrAY-RFOVL2EsnhFbi2QiwRtvNBKkpKWU2JoQ%3DN6L5Q%40mail.gmail.com.

Peter Falson

unread,
Jun 20, 2021, 9:18:56 AM6/20/21
to jb...@googlegroups.com
Alternatively if you use SQLSELECT instead of LIST/SORT then normal SQL rules would apply (either using a JOIN or a WHERE clause).

Sent from my iPhone

On Jun 19, 2021, at 1:01 PM, Joshua Camacho <wyc...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages