Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using field values to format SQL output
Message
 
 
À
26/08/2008 19:27:54
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01342035
Message ID:
01342046
Vues:
18
I think we may have one function, say, FormatValue with these parameters

FormatValue(FormatVal, FieldValue)

FormatVal is something like '9N'
and the FieldValue is the actual value of the field, e.g. SSN = "123456789"

From 9N we get 9 and N so we know that we need to have 9 digits.

Our case statements would only be for A, N, date formats and also for cases where we need to use particular first character, I guess.

But I'm just thinking aloud, I'm not sure exactly if I'm thinking in the right direction or how easy it would be to implement.


>So quick and such a seemingly simple answer. It must be harder than that.
>
>Well, I see it is much more involved, but maybe I'm wrong. I don't understand your example. Could you use my sample and explain that further?
>
>Also, I would think that there must be case statements, etc., to handle the different scenarios. Should I have a case statement based on the fields, CASE tFieldName = 'SSN', etc. for each field, then parse accordingly?
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform