Discussion Board for collaboration on QlikView Scripting.
My data in my table appears like:
1 9/1/2014 (carriage return)
9/2/2014 (carriage return)
9/3/2014 (carriage return)
What I want to end up with is:
Event ID EventDate
Dropping the carriage return and duplicated the EventID. I would like to do this in the load statement because for each EventID there could be a different number of dates.
I have been trying the Subfield function and cant get it to work. Any help would be great.
Go to Solution.
It all depends if they are carriage returns, line feeds or both: (IE: chr(13) , chr(10) or both)
one or the other:
if both use replace with subfield:
subfield( replace(replace([EventDate],chr(10),''),chr(13),',') ,',')
So it would look like:
subfield(EventDate,chr(13)) as EventDate
why not use the purechar function ?
PurgeChar(EventDate, chr(10) & chr(13)) AS EventDate
What I am looking the output to be is:
That is why I thought the subfield function was the answer but I have tried it and can get it to work. I am attaching the Excel File.
looks like chr(10) is the winner.
You need to use it in the load script. Here is the working code.
SubField( EventDate , chr(10)) as Date
(biff, embedded labels, table is Sheet1$);