Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FYI; Problem with PADL; .NULL. in SELECT SQL
Message
De
22/06/2009 08:48:49
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
22/06/2009 08:36:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01407500
Message ID:
01407524
Vues:
63
Gregory:

as mentioned in the initial message:

No behaviour change

The record with this problem is deleted anyway and never comes up into the resultset

BTW, it would be
padr(nvl(field, SET("Nulldisplay")), 11)
Agnes

Update:

Hm. I'm shure to have thisone tested, but now it gives right result with NVL. Need to re check

Anyway, its wrong behaviour.

?PADR(.NULL.,11) gives a result.


>Agnes,
>
>What's wrong with
>
>
>padr(nvl(field,''), 11)
>
>
>
>
>>Yes.
>>But there are still some apps with VFP 7.0 out here. I guess I will switch to BINTOC instead.
>>
>>Agnes
>>
>>>As you found out, it's better to use CAST() function in a query. It was created specifically for compatibility with SQL Server.
>>>
>>>>I run into this problem in a SELECT with an inner join.
>>>>
>>>>And, yes PADR(.NULL.,11) returns '.NULL. '
>>>>
>>>>But the SQL will set it to c(1). Other trimmings of PADR like PADR(...,...',_') will fail to. The browse will look like it holds eleven chars (SPACE in any way), DISPLAY STRU returns c(1)
>>>>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform