Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP SQL Syntax - Tuesday BrainFreeze
Message
 
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:
01239216
Views:
9
Sergey,

I've tried
CREATE CURSOR curTest1 (char1 C(3))
INSERT INTO curTest1 VALUES ('1')
INSERT INTO curTest1 VALUES ('2')
INSERT INTO curTest1 VALUES ('3')

CREATE CURSOR curTest2 (char2 C(5))
INSERT INTO curTest2 VALUES ('1')
INSERT INTO curTest2 VALUES ('2')
INSERT INTO curTest2 VALUES ('3')

SELECT * from curTest1 INNER JOIN curTest2 ON curTest1.char1 == curTest2.char2

=MESSAGEBOX(_tally)

SELECT * from curTest2 INNER JOIN curTest1 ON curTest2.char2 == curTest1.char1
=MESSAGEBOX(_tally)
that proved that I was indeed wrong as usual when I talk before testing or thinking. Tracy, you don't need alltrim, my mistake.

Thanks a lot for your reply. Appreciated as always.

>Wrong. The shorter one will be padded to the 7 characters before comparison.
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform