
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to concat a string with a field
I need to concatenate a string 'P' with another field Priority. Priority has values 1,2,3,4,5
Essentially the values in the revised_priority need to be P1,P2,P3,P4,P5 instead of 1,2,3,4,5
i tried doing the following but it shows invalid expression so i am not sure what is wrong with my expression
load
*,
concat('P'&Priority) as Revised_Priority
Resident Problems group by [Problem Number];
can anybody please help me with the syntax?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
the problem here will be with Load *,
try this:
load
[Problem Number],
concat('P'&Priority) as Revised_Priority
Resident Problems group by [Problem Number];
The above script should work..
so the thumb rule is if you are using group by then include all the fields in group by which are in your select/load statement.
HTH
Sushil


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
the problem here will be with Load *,
try this:
load
[Problem Number],
concat('P'&Priority) as Revised_Priority
Resident Problems group by [Problem Number];
The above script should work..
so the thumb rule is if you are using group by then include all the fields in group by which are in your select/load statement.
HTH
Sushil


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
just this much should work
load
*,
'P'&Priority as Revised_Priority
Resident Problems;
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks..both the solutions worked fine
