MGS10319
11 years agoNew Contributor
[Res]Using a Property Transfer Value in Data Source Query
I would like to use a value obtained in a Property Transfer step in a Data Source but the query directly inserts the value. It looks like this:
Select count(*)
From odsmgr.boxinvtry
@odsp
Where BNUMB Like ${GetBoxNum#Box}
${GetBoxNum#Box} is interpreted as "SASJH1656" and so the query tries to run as:
Select count(*)
From odsmgr.boxinvtry
@odsp
Where BNUMB Like "SASJH1656"
and returns an error invalid identifier.
If I go to the properties step where the value is stored from the transfer and update from SASJH1656 to '%SASJH1656%', the query runs fine. Is there a syntax I can use in the query to use this value and encapsulate in '%...%' or might I need some Groovy script to perform string manipulation? Thank you.
Select count(*)
From odsmgr.boxinvtry
@odsp
Where BNUMB Like ${GetBoxNum#Box}
${GetBoxNum#Box} is interpreted as "SASJH1656" and so the query tries to run as:
Select count(*)
From odsmgr.boxinvtry
@odsp
Where BNUMB Like "SASJH1656"
and returns an error invalid identifier.
If I go to the properties step where the value is stored from the transfer and update from SASJH1656 to '%SASJH1656%', the query runs fine. Is there a syntax I can use in the query to use this value and encapsulate in '%...%' or might I need some Groovy script to perform string manipulation? Thank you.