using SELECT.LIST within Statement in Command Line

  • Lars
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
14 years 1 month ago #7474 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!

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 1 month ago #7527 by jpb
Hi Lars,
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
  • Premium Member
More
14 years 1 month ago #7544 by Lars
Thanks jpb,

and welcome back from holiday :-)

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 1 month ago #7560 by jpb
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.

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

  • Lars
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
14 years 1 month ago #7585 by Lars
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

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 1 month ago #7592 by jpb
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

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

Time to create page: 0.039 seconds