Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Determining field format in a table
Versions des environnements
How can I determine the field definition in a table that is format, and then use that in a Transform() function.
Example: a field as N(5,2)
What I ultimately want achieve is getting a string version that field that is formatted to the same number of decimals.
Example, if the field is defined as N(5,2) and the values is 2.50, I want as string that reads “2.50”, if the value is 1.00, I want a string that is ”1.00”. But I cannot hard-code the number of decimals, it must come from the field definitions in the tables.
If it is an integer, then it will not have any decimals.
I must use the field data to determine the format of the string that I want to show in some html page I am building.
Right now, when I use the Transfrom() function, it will omit the decimals if the value is a whole number.
Transform(1.00) returns “1”, but I want “1.00”
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement