Topic
  • No replies
OptimDev
OptimDev
54 Posts

Pinned topic Look Up function Help

‏2013-04-04T02:46:04Z |
Hello All,

I am using a lookup function on State_code column and replacing the address-Line, city,Zipcode .I cannot use a hash Lookup because I should always replace the original address with a usps validated address and I cannot guarantee that with hash lookup.

Function:
LOOKUP(STATE_CODE,DEST=(Line_1_ADDRESS,Line_2_ADDRESS,City,ZIP_CODE),Test_DSQL.dbo.ADDR_LOOKUP(STATE,VALUES=(ADDRESS1,ADDRESS2,CITY,ZIPCODE)))

In some cases there are some rows with Null value in state_code but still it has the address , Zip code, City etc .In these cases, I will still want to replace the original address with fake address (even though the state code is null) and it would be helpful if this can be achieved in Lookup table also.I know in HASH lookup we would handle this scenario by creating a row in hash lookup table where seq no = -1 and I want to if there is a way in lookup also.
Thanks a lot!!!