Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2013-04-03T21:19:18Z by OptimDev
OptimDev
OptimDev
54 Posts
ACCEPTED ANSWER

Pinned topic HASH Lookup Help

‏2013-03-26T16:19:57Z |
Hello All,
I am trying to Hash look up functionality in the below way and optim is throwing an syntax error

HASH_LOOKUP((SUBSTR(CLIENT_NAME,1,1),DEST=(CLIENT_NAME),TDM_DSQL.dbo.AGENT_LOOKUP(SEQ,VALUES=(LAST_F)))
I would alo want use LEN function with in SUBSTR.Please let me know if this can be achievable or not.
Thanks
Updated on 2013-04-03T21:19:18Z at 2013-04-03T21:19:18Z by OptimDev
  • SystemAdmin
    SystemAdmin
    304 Posts
    ACCEPTED ANSWER

    Re: HASH Lookup Help

    ‏2013-04-02T09:35:53Z  in response to OptimDev
    Hi, using SUBSTR() within HASH_LOOKUP syntax is not allowed. The first argument is the name of the source column from which hash values are derived.

    You could first apply a SUBSTR() on the required source column, say SRCCOL, and then apply a Hash Lookup on the converted XF specifying SRCCOL as first argument.

    HASH_LOOKUP((SUBSTR(CLIENT_NAME,1,1),DEST=(CLIENT_NAME),TDM_DSQL.dbo.AGENT_LOOKUP(SEQ,VALUES=(LAST_F)))
    • SystemAdmin
      SystemAdmin
      304 Posts
      ACCEPTED ANSWER

      Re: HASH Lookup Help

      ‏2013-04-02T10:27:39Z  in response to SystemAdmin
      Since you are using single replacement column you don't need DEST= and VALUES=

      Apply the following on column CLIENT_NAME (destination):
      HASH_LOOKUP(SRCCOL,TDM_DSQL.dbo.AGENT_LOOKUP(SEQ,LAST_F))