Discussion Board for collaboration on QlikView Scripting.
I have managed to load data from our SQL server into Qlikview by:
SELECT a,b,c FROM TABLE1
Then later on I would like to create a few new fields using:
IF(MATCH(a,'Apples'),'FRUIT','VEGETABLE') as GROCERY_MARKER;
This last line of code does not give me the newly created GROCERY_MARKER among my field list.
So two questions:
1.Should my SQL be under a LOAD command (I know Qlikview does it by default) and the result to be defined by a Table name?
2. How can I get this new field to appear on my field list? I believe it might be related to the first question, as I might need to define my table to refer to it on question 2.
Thanks for your help and patience,
Go to Solution.
you should code it in this way
and your new field will appear with the others
View solution in original post
Does this mean that every time I add a new field after my load line, I need to rerun the whole SQL? or can I just run that bit on its own?
Thanks for quick come back.
you can also run your sql once and store the result in a qvd file
then load your data from this qvd and add additional fields