using SELECT.LIST within Statement in Command Line
- Lars
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 110
- Thank you received: 8
14 years 1 month ago #7474
by Lars
using SELECT.LIST within Statement in Command Line was created by Lars
Hi,
I want to use a select list (from &SAVED.LISTS&) within a statement, like
SELECT FBNK.CUSTOMER WITH SECTOR EQ "NAME.OF.SELECT.LIST"
any ideas or solutions?
Thanks!
I want to use a select list (from &SAVED.LISTS&) within a statement, like
SELECT FBNK.CUSTOMER WITH SECTOR EQ "NAME.OF.SELECT.LIST"
any ideas or solutions?
Thanks!
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
14 years 1 month ago #7527
by jpb
Replied by jpb on topic Re: using SELECT.LIST within Statement in Command Line
Hi Lars,
there is no way to achive this as far as I know,
only way might be to use a routine.
Regards,
jpb
there is no way to achive this as far as I know,
only way might be to use a routine.
Regards,
jpb
Please Log in or Create an account to join the conversation.
- Lars
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 110
- Thank you received: 8
14 years 1 month ago #7544
by Lars
Replied by Lars on topic Re: using SELECT.LIST within Statement in Command Line
Thanks jpb,
and welcome back from holiday :-)
and welcome back from holiday :-)
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
14 years 1 month ago #7560
by jpb
Replied by jpb on topic Re: using SELECT.LIST within Statement in Command Line
I would prefer to be were I was last week ... ;-)
I just played around a little with SQLSELECT, maybe with a little effort this can solve your problems...
When I execute
SQLSELECT A.'@ID' FROM FBNK.CUSTOMER A WHERE A.SECTOR IN (SELECT B.'@ID' FROM FBNK.SECTOR B WHERE B.DESCRIPTION LIKE '%PRIV%')
I get the same amount of records as with
SELECT FBNK.CUSTOMER ONLY WITH SECTOR EQ 1000 OR WITH SECTOR EQ 2000 OR WITH SECTOR EQ 3000
(these 3 SECTOR have PRIV in the DESCRIPTION).
Only the output is a bit strange - but there might be better formattings, at least a "JOIN" is possible that way . . .
Documentation is www.jbase.com/new/support/41docs/jBASE%20SQL%20Engine.pdf
Enjoy and let me know if it's working at last.
I just played around a little with SQLSELECT, maybe with a little effort this can solve your problems...
When I execute
SQLSELECT A.'@ID' FROM FBNK.CUSTOMER A WHERE A.SECTOR IN (SELECT B.'@ID' FROM FBNK.SECTOR B WHERE B.DESCRIPTION LIKE '%PRIV%')
I get the same amount of records as with
SELECT FBNK.CUSTOMER ONLY WITH SECTOR EQ 1000 OR WITH SECTOR EQ 2000 OR WITH SECTOR EQ 3000
(these 3 SECTOR have PRIV in the DESCRIPTION).
Only the output is a bit strange - but there might be better formattings, at least a "JOIN" is possible that way . . .
Documentation is www.jbase.com/new/support/41docs/jBASE%20SQL%20Engine.pdf
Enjoy and let me know if it's working at last.
Please Log in or Create an account to join the conversation.
- Lars
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 110
- Thank you received: 8
14 years 1 month ago #7585
by Lars
Replied by Lars on topic Re: using SELECT.LIST within Statement in Command Line
Hi jpb,
I tried with SQLSELECT, but getting problems when FIELD.NAMES have a dot
in the name.
I will use a routine when facing bigger problems....
thanks for your help!
Lars
I tried with SQLSELECT, but getting problems when FIELD.NAMES have a dot
in the name.
I will use a routine when facing bigger problems....
thanks for your help!
Lars
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
14 years 1 month ago #7592
by jpb
Replied by jpb on topic Re: using SELECT.LIST within Statement in Command Line
You can use F1 F2 F3 instead of names with a dot (when defined in VOC, *A1 etc. doesn't work).
File VOC , Record 'F101'
Command->
0001 D
0002 101
0003
0004 Line 101
0005 50L
0006 S
File VOC , Record 'F101'
Command->
0001 D
0002 101
0003
0004 Line 101
0005 50L
0006 S
Please Log in or Create an account to join the conversation.
Time to create page: 0.039 seconds