Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP SQL Syntax - Tuesday BrainFreeze
Message
De
11/07/2007 08:58:34
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:
01239213
Vues:
9
>>>>Wouldn't LEFT JOIN ON alltrim(upper(table1.aid))==alltrim(upper(table2.bid)) work regardless?
>>>>
>>>Yes, it would. Never used such construction in JOIN myself, but it would work regardless, you're right. Do you have NULL in any of ID fields?
>>
>>No you don't need alltrim() but may need upper(). You already used "==" operator, right? It ensures that trailing spaces are not important.
>>Cetin
>
>Cetin,
>
>If Table1.aID is char 6 and Table2.bID is char 7 or vs. versa using == would result in 0 records match.
>
>Personally I either use GUID or integer PKs, that's why I never had a need to use alltrim. But in Tracy's case (it's her problem) I'd say we either need to use alltrim or pad the shortest string to the longest string length.
>
>You may check this http://www.berezniker.com/display/VFP/String+comparison+in+VFP for better than mine explanation.

No Naomi,
You are mistaken but I'm ready for a bet:) == ensures that size would not be an issue.
I don't need to check a reference, if it's saying it there the way you say then that reference is wrong.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform