Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
let vEngNumber=peek('ePartner',$(vRand),'Sampling1');
This works and returns a value like Greenberg, Dan
Where I am having trouble is
Sampling2:
Load
eEngNumber,
ePartner,
[Engagement Start Date]
Resident Sampling1
where ePartner <> $(vPartnerB);
I need to wrap the $(vPartnerB) with single quotes otherwise it's interpreted as
where ePartner <>Greenberg,Dan
what I want is
where ePartner <> 'Greenberg,Dan'
What am I doing wrong?
I think this should also work:
LET vEngNumber=Chr(39) & Peek('ePartner',$(vRand),'Sampling1') & Chr(39);
and then this:
Sampling2:
Load
eEngNumber,
ePartner,
[Engagement Start Date]
Resident Sampling1
where ePartner <> $(vPartnerB);
Maybe put the single quotes round it :
.... where ePartner <> '$(vPartnerB)';
Dan Greeberg wrote:
let vEngNumber=peek('ePartner',$(vRand),'Sampling1');
I need to wrap the $(vPartnerB) with single quotes otherwise it's interpreted as
where ePartner <>Greenberg,Dan
what I want is
where ePartner <> 'Greenberg,Dan'
What am I doing wrong?
Not sure if I understand your question, I think you've already answered it, wrap the dollar sign expansion in single quotes.
So this is not working for you?
I think this should also work:
LET vEngNumber=Chr(39) & Peek('ePartner',$(vRand),'Sampling1') & Chr(39);
and then this:
Sampling2:
Load
eEngNumber,
ePartner,
[Engagement Start Date]
Resident Sampling1
where ePartner <> $(vPartnerB);
Thank you Sunny.
This worked
I would have assumed Bill's method to have worked as well. That did not work?
'$(vPartnerB)' is interpreted as '''Greenberg, Dan''' and did not work.
Dan Greeberg wrote:
'$(vPartnerB)' is interpreted as '''Greenberg, Dan''' and did not work.
That's how the document log or debug screen logs the expanded variable? With added double quotes?
Interesting, that's against everything I've learned about how dollar sign expansion should work...
Wrapping the dollar sign expansion in single quotes does not work in my where clause but ch(39) & $(vPartnerB) & chr(39) works
Are you sure you've tried adding the single quotes at the right place?
LET vEngNumber=Chr(39) & Peek('ePartner',$(vRand),'Sampling1') & Chr(39);
and then this:
Sampling2:
Load
eEngNumber,
ePartner,
[Engagement Start Date]
Resident Sampling1
where ePartner <> $(vPartnerB);
Sunny's change should have had no effect at all, since variable vEngNumber is not used in the where clause.
edit: And don't take me wrong, Dan, I just want to understand why the trivial solution doesn't work...