Philippe Harnois
22 years ago
Hi,
I want add multiple column with the following code
This code is in a For ... Next Loop
lcCompteur = PADL(ALLTRIM(STR(lnCompteur,2)), 2, "0")
lcAnn_FiscPP = "Ann_FiscPP" + lcCompteur + " n(4) "
lcAnn_FiscPA = "Ann_FiscPA" + lcCompteur + " n(4) "
lcPeriode = "Periode" + lcCompteur + " n(2) "
lcTotAnnPA = "TotAnnPA" + lcCompteur + " n(6) "
lcTotAnnPP = "TotAnnPP" + lcCompteur + " n(6) "
lcTotCliPA = "TotCliPA" + lcCompteur + " n(6) "
lcTotCliPP = "TotCliPP" + lcCompteur + " n(6) "
lcTotPriPA = "TotPriPA" + lcCompteur + " n(12,2) "
lcTotPriPP = "TotPriPP" + lcCompteur + " n(12,2) "
ALTER TABLE curStatistique ;
ADD COLUMN &lcPeriode ;
ADD COLUMN &lcAnn_FiscPA ;
ADD COLUMN &lcAnn_FiscPP ;
ADD COLUMN &lcTotAnnPA ;
ADD COLUMN &lcTotAnnPP ;
ADD COLUMN &lcTotCliPA ;
ADD COLUMN &lcTotCliPP ;
ADD COLUMN &lcTotPriPA ;
ADD COLUMN &lcTotPriPP
But when I execute the program, it's telling me that I have duplicate field
or invalid name when I try to alter table. Can I add more that one column at
the same time?
I want add multiple column with the following code
This code is in a For ... Next Loop
lcCompteur = PADL(ALLTRIM(STR(lnCompteur,2)), 2, "0")
lcAnn_FiscPP = "Ann_FiscPP" + lcCompteur + " n(4) "
lcAnn_FiscPA = "Ann_FiscPA" + lcCompteur + " n(4) "
lcPeriode = "Periode" + lcCompteur + " n(2) "
lcTotAnnPA = "TotAnnPA" + lcCompteur + " n(6) "
lcTotAnnPP = "TotAnnPP" + lcCompteur + " n(6) "
lcTotCliPA = "TotCliPA" + lcCompteur + " n(6) "
lcTotCliPP = "TotCliPP" + lcCompteur + " n(6) "
lcTotPriPA = "TotPriPA" + lcCompteur + " n(12,2) "
lcTotPriPP = "TotPriPP" + lcCompteur + " n(12,2) "
ALTER TABLE curStatistique ;
ADD COLUMN &lcPeriode ;
ADD COLUMN &lcAnn_FiscPA ;
ADD COLUMN &lcAnn_FiscPP ;
ADD COLUMN &lcTotAnnPA ;
ADD COLUMN &lcTotAnnPP ;
ADD COLUMN &lcTotCliPA ;
ADD COLUMN &lcTotCliPP ;
ADD COLUMN &lcTotPriPA ;
ADD COLUMN &lcTotPriPP
But when I execute the program, it's telling me that I have duplicate field
or invalid name when I try to alter table. Can I add more that one column at
the same time?
--
Philippe Harnois
PS Excuse me for my poor english...
Philippe Harnois
PS Excuse me for my poor english...