|
Publicité ' | |||||||||||||||||||||||
|
|
#1 | ||
|
Invité de passage
![]() mohamed-ali Consultant informatique Inscription : mai 2011 Messages : 7 ![]() |
Bonjour,
j'ai un problème de format du montant : 1- si j'exécute l'ordre select sur sql-server le montant est correct 3136,443 2- si j'exécute l'ordre select avec la commande bcp le montant est 3136.4430000000002 comment résoudre ce problème sachant que montant est float dans SQL ? MERCI D'AVANCE Détails : Code :
AQUALUX 3136,443 TRAITE AQUALUX 1428,126 TRAITE AQUALUX 1131,957 TRAITE Code :
bcp "select t.nom,t.montant,t.modepaie from datafactor..echeance t where maj = 0 and contrat = 67" queryout c:\echeancier.txt -c -t ; -T
AQUALUX ;3136.4430000000002 ;TRAITE AQUALUX ;1428.126 ;TRAITE AQUALUX ;1131.9570000000001 ;TRAITE |
||
|
|
00
|
|
|
#2 |
|
Membre Expert
![]() ![]() |
tu peux caster la colonne "montant " dans la commande bcp. Quelque chose du genre
Code :
bcp "select t.nom,cast(t.montant as decimal(24,3)),t.modepaie from datafactor..echeance t where maj = 0 and contrat = 67" queryout c:\echeancier.txt -c -t ; -T
|
|
00
|
Copyright © 2000-2012 - www.developpez.com