Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
i have this script
Achat:
load
ID,
date_commande
;
load
id_ligne,
N_Commande,
date_commande,
id_ligne&N_Commande as ID,
from source.qvd
paiement:
Load
id_paiement,
id_ligne as ligne,
N_Commande as cmd,
Applymap('Achat',id_ligne&N_commande,'xx') as date_cmd
from source.qvd
i want to get the date_cmmande of each id_ligne concatenate with N_commade from the table Achat
is a correct code or not , i cant get this infomation
thanks
After fixing all the smaller mistakes the syntax highlighter was throwing with me and others that could or would have lead to errors, as well as cleaning things up a bit I'm left with this:
Achat:
Mapping Load
ID,
date_commande;
Load
id_ligne,
N_Commande,
date_commande,
id_ligne & '|' & N_Commande as ID
From "source.qvd" (qvd);
paiement:
Load
id_paiement,
id_ligne as ligne,
N_Commande as cmd,
Applymap('Achat', id_ligne & '|' & N_commande, 'xx') as date_cmd
From "source.qvd" (qvd);
I can't test it since I don't have the data, but it should work.
However you are creating the map from the exact same fields you are then applying it to. In other words: The map will always be able to be applied. You could've used a join or even easier: load the data directly from the file:
paiement:
Load
id_paiement,
id_ligne as ligne,
N_Commande as cmd,
date_commande as date_cmd
From "source.qvd" (qvd);
After fixing all the smaller mistakes the syntax highlighter was throwing with me and others that could or would have lead to errors, as well as cleaning things up a bit I'm left with this:
Achat:
Mapping Load
ID,
date_commande;
Load
id_ligne,
N_Commande,
date_commande,
id_ligne & '|' & N_Commande as ID
From "source.qvd" (qvd);
paiement:
Load
id_paiement,
id_ligne as ligne,
N_Commande as cmd,
Applymap('Achat', id_ligne & '|' & N_commande, 'xx') as date_cmd
From "source.qvd" (qvd);
I can't test it since I don't have the data, but it should work.
However you are creating the map from the exact same fields you are then applying it to. In other words: The map will always be able to be applied. You could've used a join or even easier: load the data directly from the file:
paiement:
Load
id_paiement,
id_ligne as ligne,
N_Commande as cmd,
date_commande as date_cmd
From "source.qvd" (qvd);
that work parfectly
Thanks