Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP SQL Syntax - Tuesday BrainFreeze
Message
 
 
À
11/07/2007 11:39:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01238981
Message ID:
01239340
Vues:
8
>Just a sample hit me, somehow related, from another forum:
>
>select alltrim(firstName)+' '+alltrim(lastName) as fullName from ...
>
>vs
>
>select firstName-(' '+lastName) as fullName from ...
>
>The latter ensures you'd have a consistent result even if the base structures change.
>Cetin

I've tried it and got 51 for both cases:
CREATE CURSOR Table1 (FirstName C(20), LastName C(30))
INSERT INTO Table1 VALUES ('Mike', 'Cole')
INSERT INTO Table1 VALUES ('Cetin', 'Basoz')
INSERT INTO Table1 VALUES ('Tracy', 'Holzer')
INSERT INTO Table1 VALUES ('Borislav', 'Borissov')

select alltrim(firstName)+' '+alltrim(lastName) as fullName ;
from table1 INTO CURSOR curTest
=MESSAGEBOX(FSIZE('fullName'))

select firstName-(' '+lastName) as fullName ;
from table1 INTO CURSOR curTest
=MESSAGEBOX(FSIZE('fullName'))
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