Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP SQL Syntax - Tuesday BrainFreeze
Message
From
11/07/2007 11:54:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01238981
Message ID:
01239344
Views:
12
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform