General information
Category:
Coding, syntax & commands
>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only