SQL queries in JBase
The query Language of Jbase is really restrictive. Data analysis and comparison between two table is not possible without the use of spreadsheet software. I recently came to know that Jbase is providing a command called SQLSELECT through which you can actually issue SQL query command directly on Jbase tables.
A sample would be like
SQLSELECT * FROM FBNK.ACCOUNT WHERE SHORT_NAME LIKE '%PETER%' AND CATEGORY = 6601
Limitations:
The command though have serious limitations such as
The table you query should not have dot charecter for example you cannot query FBNK.CUSTOMER.ACCOUNT with this command.
But there is a workaround for the above drawback. Make a copy of the VOC record FBNK.CUSTOMER.ACCOUNT into a new one without ID in its ID.
For Example:
COPY FROM VOC FBNK.CUSTOMER.ACCOUNT,FBNK.CUSACC
SQLSELECT * FROM FBNK.CUSACC; will work.
But there is a workaround for the above drawback. Make a copy of the VOC record FBNK.CUSTOMER.ACCOUNT into a new one without ID in its ID.
For Example:
COPY FROM VOC FBNK.CUSTOMER.ACCOUNT,FBNK.CUSACC
SQLSELECT * FROM FBNK.CUSACC; will work.
The field name should not have dot character. You can overcome this by changing the dot character to underscore. For example SHORT_NAME in the above query.
And so many other limitations such as complexity in executing join operations on tables.
Link to JQL guide for more information
https://www.dropbox.com/s/xtvp5037nh68yuf/jBASE%20SQL%20Engine.pdf
https://www.dropbox.com/s/xtvp5037nh68yuf/jBASE%20SQL%20Engine.pdf
You can use quotes in your string:
ReplyDeleteSQLSELECT CUSTOMER_CODE FROM "FBNK.CUSTOMER.ACCOUNT"