I'm using QV11 SR2, and at first sight it seems strange indeed... I'll have to think about it for a while to see why it is (if there is a reason at all).
So I think things are not changed in v11SR2
#Edit, when you put the function text() around your fieldnames, the problem is gone...
So the issue is in the fact that it gets converted to numeric/int...
Load text(Case_id) as Case_id, (Ref) as Ref inline [ Case_id, Ref 6132398, '115154' 2628159, '2215-0004-12' 1519326, '26-59-8' 2931587, '12548' 6982151, '1515' ];
I cannot really judge whether it is a QV-bug... My opinion would be yes (but perhaps that is too easy). I would say Qlikview should consider the data in the column Ref, and when it does not have only numerical characters, then evaluate it to text and not to numeric/integer
I am far from saying this is intuitive or not misleading.
I don't really know how (or based on what actions / informations) QV creates the tags, so I started not to heavily rely on them anyway.
It might seems kind of strange that QV interprets above as a Date even when the date format is set to something different (like in the sample).
I believe QV is always accepting ISO formatted dates (no, not always, try adding date#('2215-04-12') as Date to the INLINE LOAD, it will not parse the value as date, you need to add the format).
So, QV is sometimes accepting ISO formatted dates (even at places you won't expect it to do).
Sometimes I wish QV had an optional switch 'Disable all automatism'...
I think the work around is like you already stated above, use text() around the Ref field name.