Information générale
Catégorie:
Codage, syntaxe et commandes
>Of course, as soon as I post I figure out my problem:
>
>lcScanGreater = LEFT(tcOrder, LEN(tcOrder - 1))
>
>Should be
>lcScanGreater = LEFT(tcOrder, LEN(tcOrder)-1)
>
>i know type(12345) should return N, I am still puzzled why type('12345') would return N
VARTYPE ("12345") && Returns "C" as it interprets the type of the value passed.
TYPE ("12345") && Returns "N" as it interprets the type of the evaluated value passed
TYPE ("'12345'") && Returns "C" which is what you're looking for.
>
>
>>This may be an easy one...(I must be overlooking something very simple)
>>
>>I have a table with a field called 'torder'. Its a character field, width of 5. The values in it will be numeric (but still be character type). So '2 ', '21 ', '211 ', '212 ', '22 ', '221 ', '222 ' are some typical values.
>>
>>I've been getting all sorts of "Function, argument, value, type or count is invalid errors". Which usually means you are trying to do a charactor only function on the variable or field that is numeric. I got puzzled so I did a messagebox(type(torder)) and it returned a N! So I did a lcOrder = alltrim(str(torder)) and I got another "function,...is invalid" error. So it seems that the field is both numeric and charactor at the same time?
>>
>>I am sure there is something small I've overlooked but that will be obvious when someone posts an answer, but I've been stuck on this for over an hour now...
>>
>>Thanks!
Précédent
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