SELECT statment in 4.1

  • ironmaiden
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
19 years 5 months ago #1753 by ironmaiden
SELECT statment in 4.1 was created by ironmaiden
Hi,

why in jBase 4.1 in SELECT statement for = operation I HAVE to include
the value in quotes, but for >= or <= it's not necesary ?

For ex:
SELECT FBNK.STMT.VAL.ENTRY WITH (VALUE.DATE >= 20050401 AND VALUE.DATE
LE 20050601) AND (ACCOUNT.NUMBER = 32678)
gives me error: Parse Error: 32678

but

SELECT FBNK.STMT.VAL.ENTRY WITH (VALUE.DATE >= 20050401 AND VALUE.DATE
<= 20050601) AND (ACCOUNT.NUMBER = '32678')

runs OK ?
_________________
NJOY LIFE TO THE FULLEST

Please Log in or Create an account to join the conversation.

More
19 years 5 months ago #1754 by malai
Replied by malai on topic SELECT statment in 4.1
The SELECT statement in jBASE4.1 is not much flexible as in jBASE4.0.

But in terms of performance 4.1 is best compared to lower versions.

Some points for better performance.

1. While giving condition always give the field name.
2. Always cover the field value with single/double quotes.
3. Use appropriate brackets.

Still many more are there.
_________________
M A L A I

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #1755 by KingArthur
Replied by KingArthur on topic SELECT statment in 4.1
Hi,

One more new to add.

SELECT MY.FILE WITH @ID LIKE ...HELLO...

id equal to

SELECT MY.FILE WITH @ID EQ [HELLO]

Can any one try and find, is there any performance improvement?
_________________
King Arthur

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #1756 by malai
Replied by malai on topic SELECT statment in 4.1
Hi

Using EQ [HELLO] is more faster than LK ...HELLO...
_________________
M A L A I

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #1757 by takoor
Replied by takoor on topic SELECT statment in 4.1
your select statement needs to have the quotes and a typical statement can be
SELECT FBNK.WHATEVER WITH CATEGORY EQ '01' 03' '04' '05'
_________________
takoor

Please Log in or Create an account to join the conversation.

Time to create page: 0.029 seconds