Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Hoping for some help on this.
I have a chunk of code that I am repeating many times in my data model so I thought it would be perfect to move this to a sub routine with some parameters (as each run is slightly different).
The issue I am having is that when I try to pass the a field name and use it in where clause I am getting '' instead of the field.
Sub Calc (vMeasure)
TEMP_Table1:
LOAD
Field1
, Field2
WHERE '$(vMeasure)' = 1
END SUB
CALL CALC (CYFlag);
So in this quick example, I would get an error stating that '' =1.
How can I specify the name of a field that exists in that table as part of the Call?
You should try to put ' ' around your parameter value 'CYFLAG'.
See the adjusted script below.
Sub Calc (vMeasure)
TEMP_Table1:
LOAD
Field1
, Field2
WHERE [$(vMeasure)] = 1
END SUB
CALL CALC ('CYFlag');
You should try to put ' ' around your parameter value 'CYFLAG'.
See the adjusted script below.
Sub Calc (vMeasure)
TEMP_Table1:
LOAD
Field1
, Field2
WHERE [$(vMeasure)] = 1
END SUB
CALL CALC ('CYFlag');
Thanks. I literally just figured that out and now it is working.
Thanks for the post though!