🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-22-2016 11:46 AM
(146372 views)
Hi All,
Below I am trying to concatenate the string 'Prospective Targeted' with field INT_YEAR. When I run the program I get error '
ERROR: Concatenation (||) requires character operands.'
SELECT
MEMBER_HCID
,MAX(CASE WHEN T2.HC_ID IS NOT NULL THEN 'Prospective Targeted'||''|| INT_YEAR ELSE 'NOT TARGETED' END) AS Prospective_Target
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Apparently your year variable is numeric.
Try
catx(' ','Prospective Targeted',INT_YEAR )
instead.
The concatenation functions generally have better behavior than || concatenation operator.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Apparently your year variable is numeric.
Try
catx(' ','Prospective Targeted',INT_YEAR )
instead.
The concatenation functions generally have better behavior than || concatenation operator.