Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP SQL Syntax - Tuesday BrainFreeze
Message
De
11/07/2007 11:54:29
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:
01239344
Vues:
11
>>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'))
Might be but that's version dependant. Now try with joins involved:) I didn't want to wait for VFP to get smarter:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform