Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor field with 2 decimals ???
Message
De
27/12/2006 04:14:04
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Allemagne
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Cursor field with 2 decimals ???
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MySQL
Divers
Thread ID:
01180416
Message ID:
01180416
Vues:
58
Hello Everybody !

This one makes me crazy !!??
I need a field vkpreis with 2 decimals to fill an SAP-System with new prices

ODBC-select:

l_select = "select distinct tsttd1.idtnr,tsttd1.beze as bezeichnung," +;
"tsttd1.beze," +;
"tsttd1.me,tsttd1.bezug,mbstd1.PEV," + ;
"mbstd1.verr,mbstd1.mibe,mbstd1.mbmg,mbstd1.lapl,mbstd1.labes,tsttd1.stgew, " + ;
"' ' as teileart,' ' as vkme,99999.99 as vkpreis,mbstd1.wibzt " +;
" from mbstd1,tsttd1 " +;
" where tsttd1.beze <> ' ' and tsttd1.lkz = ' '" +;
" and tsttd1.idtnr = mbstd1.idtnr " +;
" and mbstd1.lgidt like '0700%' " +;
"order by tsttd1.idtnr"

= sqlexec(conn,l_select,"mydata")

browse

vkpreis = 9999,9900 ????????


I scan mydata to fill vkpreis from another cursor

scan

IF INDEXSEEK(idtnr,.T.,"einmal") = .T.
IF einmal.prsneu > 0
l_vkpreis = ROUND(einmal.prsneu / 100,2)
replace vkpreis WITH l_vkpreis
ELSE
replace vkpreis WITH 0.00
endif


ELSE
replace vkpreis WITH 0.00
endif

endscan

vkpreis = 0,000 or 47,2800 ..... ???????

I do a final select

select distinct SUBSTR(idtnr,1,1) + ALLTRIM(SUBSTR(idtnr,1,23)) as idtnr,beze,me,bezug,pev,;
verr,mibe,mbmg,lapl,labes,stgew,teileart,vkme,ROUND(vkpreis / 1,2) as vkpreis,wibzt ;
FROM mydata WHERE DELETED() = .F. INTO CURSOR teilekomplett
browse

vkpreis = 0,000 or 47,2800 ..... ?????

I want vkpreis with 2 decimals ?????

Any help welcomed
Best regards
Albert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform