Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help : load all the files and insert calculated columns

Hi

I want to load all the colums of a qvd file :

LOAD * FROM

\\As01\qlikview\loader\QV_TOU_FACTURATION.QVD

(qvd);

but I also want to add some other calculated columns like

year( DATE_ARRIVEE_PRODUIT) as YEAR_ARRIVEE_PRODUIT,

What is the syntax I have to use in the expression loader.

It works if I write all the colums that exist in the qvd file:

LOAD

     CS_PID,

     DATE_ARRIVEE_PRODUIT,

     year( DATE_ARRIVEE_PRODUIT) as YEAR_ARRIVEE_PRODUIT,

     ....

     ....

     ...

     ....

FROM

\\As01\qlikview\loader\QV_TOU_FACTURATION.QVD

(qvd);

But I have enormously colums and I would prefer to charge all the colums in one expression by using " * "

Thanks for your help

Laurent

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You must remove the ',' Comma from the last field name.

     Have a look at the attachment.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

9 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can try like this.

     Load *,Year(Date) as year.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi

I have the message

Erreur de syntaxe, FROM manquant ou mal placé :

LOAD *,

I have attached my document, if necessary

Thank

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You must remove the ',' Comma from the last field name.

     Have a look at the attachment.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Thanks a lot

Anonymous
Not applicable
Author

Hi

Thank you for your response

What is the syntax if in place of a qvd file, I have an sql table

Select SQL *,

....

from....

It doesn't work

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Try this

     Load *,year(Date) as Year;

     Sql Select * from abc;

     Just include the load statement as shown above.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi

I think you have not understand what I mean

If I have just an sql select inplace of a LOAD from a qvd file, the syntax

SQL SELECT *,

     year(DATE_ARRIVEE_PRODUIT) as YEAR_ARRIVEE_PRODUIT

FROM `QV_DB`.`QV_TOU_FACTURATION`;

doesn't work

What is the right syntax ?

Reagrds

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I am sorry i couldnt able to explain properly.

     See the code i have given in earlier post is right.

     That script doesnt take data from Qvd;

     Let me show you the script and explain its working.

     Load *,year(Date) as Year; 

     Sql Select * from abc;

     Here QlikView will take the data from Database and then it will do the calculations to create calculated columns and then give output with both calculated columns and all other original columns.

     As you see in script after load statement there is no from column, only ; is there.

    

     Hope this is clear. Try the code and let me know.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Great It Works

Thanks