RRDI: How to get non-string values of custom attributes?
Hi
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.jazz.reports.doc%2Ftopics%2Fqm_t_customatt.html shows how to get e Sting extension value. How do I do the same for an integer extension?
I tried the following:
if ( = 'completedefforts') THEN
(..)
ELSE ('')
but that gives me an error:
RQP-DEF-0177
An error occurred while performing operation 'sqlScrollBulkFetch' status='-232'.
UDA-SQL-0144 An arithmetic exception was detected. SQL0420N Invalid character found in a character string argument of the function "DECFLOAT". SQLSTATE=22018 UDA-CUR-0000 Unable to fetch the row
If I look at the properties of (.., it shows as
Data type Int32 (Integer)
I can get the (string) value if I cast it to a varchar as:
if ( = 'completedefforts') THEN
(cast(..,varchar(3)))
ELSE ('')
but then I assume I need to do some reverse casting back into integer to do any count or total type stuff on the value.
Is there a way to just get the integer vale in the query without having to do the cast and recast?
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.jazz.reports.doc%2Ftopics%2Fqm_t_customatt.html shows how to get e Sting extension value. How do I do the same for an integer extension?
I tried the following:
if ( = 'completedefforts') THEN
(..)
ELSE ('')
but that gives me an error:
RQP-DEF-0177
An error occurred while performing operation 'sqlScrollBulkFetch' status='-232'.
UDA-SQL-0144 An arithmetic exception was detected. SQL0420N Invalid character found in a character string argument of the function "DECFLOAT". SQLSTATE=22018 UDA-CUR-0000 Unable to fetch the row
If I look at the properties of (.., it shows as
Data type Int32 (Integer)
I can get the (string) value if I cast it to a varchar as:
if ( = 'completedefforts') THEN
(cast(..,varchar(3)))
ELSE ('')
but then I assume I need to do some reverse casting back into integer to do any count or total type stuff on the value.
Is there a way to just get the integer vale in the query without having to do the cast and recast?
2 answers
I think the problem is that you're trying to potentially return both an integer or a string in the same data item which won't work.
Try changing the else clause to return null or a 0 instead.
Try changing the else clause to return null or a 0 instead.
if ([Custom Attribute Name for Bug] = 'completedefforts') THEN
([Business View].[Request Integer Extension].[Value])
ELSE (null)
Hi
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.jazz.reports.doc%2Ftopics%2Fqm_t_customatt.html shows how to get e Sting extension value. How do I do the same for an integer extension?
I tried the following:
if ( = 'completedefforts') THEN
(..)
ELSE ('')
but that gives me an error:
RQP-DEF-0177
An error occurred while performing operation 'sqlScrollBulkFetch' status='-232'.
UDA-SQL-0144 An arithmetic exception was detected. SQL0420N Invalid character found in a character string argument of the function "DECFLOAT". SQLSTATE=22018 UDA-CUR-0000 Unable to fetch the row
If I look at the properties of (.., it shows as
Data type Int32 (Integer)
I can get the (string) value if I cast it to a varchar as:
if ( = 'completedefforts') THEN
(cast(..,varchar(3)))
ELSE ('')
but then I assume I need to do some reverse casting back into integer to do any count or total type stuff on the value.
Is there a way to just get the integer vale in the query without having to do the cast and recast?
Perfect! That worked.
Thanks!
Thanks!
I think the problem is that you're trying to potentially return both an integer or a string in the same data item which won't work.
Try changing the else clause to return null or a 0 instead.
if ([Custom Attribute Name for Bug] = 'completedefforts') THEN
([Business View].[Request Integer Extension].[Value])
ELSE (null)