1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
LibelleREQ est une chaîne = "SELECT"+...
"Piece.IDPiece AS IDPiece,"+...
"Piece.TypePiece AS TypePiece,"+...
"Piece.DatePiece AS DatePiece,"+...
"Piece.NumeroPiece AS NumeroPiece,"+...
"Representant.codeRepresentant AS codeRepresentant,"+...
"Personnel.code AS code"+...
"FROM"+...
"Piece"+...
"LEFT OUTER JOIN Personnel ON Personnel.IDPersonnel = Piece.IDPersonnel,"+...
"LEFT OUTER JOIN Client ON Client.IDClient = Piece.IDClient,"+...
"LEFT OUTER JOIN Representant ON Representant.IDRepresentant =Piece.IDRepresentant"+...
"WHERE"+...
"("+...
"Piece.phase IN ({ParamIDSolde1}, {ParamIDSolde2}, {ParamIDSolde3}, {ParamIDSolde4})"+...
"AND Piece.TypePiece = {ParamTypePiece}"+...
"AND Piece.IDClient = {ParamIDClient}"+...
"AND Piece.IDSite = {ParamSite}"+...
"AND"+...
"("+...
"Piece.nomCommande = {ParamNomAdresse}"+...
"OR Piece.nomFacturation = {ParamNomAdresse}"+...
"OR Piece.nomLivraison = {ParamNomAdresse}"+...
")"+...
")"+...
"ORDER BY"+...
"NumeroPiece DESC;"
MaREQ est une source de données
HExécuteRequêteSQL(MaREQ,MaConnexion,hRequêteSansCorrection,LibelleREQ)
HLitPremier(MaREQ) |
Partager