Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00512431
Message ID:
00512436
Vues:
9
This message has been marked as the solution to the initial question of the thread.
>To all,
>
> I am issuing a select:
>
>SELECT nPrice, iLevel, iCount, ThisForm.GetFraction(iFraction) AS cFract, STR(iCount) + STR(iFraction) AS cSort FROM Pricing INTO CURSOR crsPrice WHERE Pricing.iPriceGpId = MenuItem.iPriceGpId ORDER BY cSort
>
> Everything works fine except that the return from the funtion only returns the first five characters, when actually the return is never shorter than 10 characters. All fields being selected are Integer fields except for the first one which is a N(8,2). I dumped the cursor out to a file and it indeed only has 5 characters in the structure. Any one know why this happens, and if it's for some odd reason "By design."
>
> Any help would be much appreciated.
>
>John Rowlinson
>Microworks POS Solutions

I would PADR both your cFract and cSort fields so that the same length is always returned. The SELECT will make the field size based off of the first record that is added to the cursor.

Dan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform