Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constant value from file2
Message
De
13/07/2015 10:04:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/07/2015 11:53:24
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 5
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01621990
Message ID:
01622006
Vues:
49
See what happens if you add the "AS" keyword: ... '1' AS cKey

This should be implicit, but if I remember correctly, older versions of Visual FoxPro interpret:
'1' cKey
as:
'1', cKey
rather than supplying the AS keyword which should be implicit.

>Hi All:
>
>This is file2:
>
>
>cKey     Desc
>'1'          one
>'2'          two
>
>
>I want to run an SQL statement, something like this:
>
>
>SELECT file1.*, '1' cKey, ;
>file2.desc Desc2 ;
>FROM file1 ;
>INNER JOIN file2 ;
>ON file1.cKey = file2.cKey ;
>INTO CURSOR c1
>
>
>that will produce the following:
>
>
>Fields from file1     Desc2
>... ... ... ...               one
>... ... ... ...               one
>... ... ... ...               one
>
>
>The problem is that I get a message that 'Column ckey is not found'
>
>Please note that I obviously want the most elegant solution, but if necessary, please give a solution that will work in VFP 5.0.
>
>Thanks,
>
>Yossi
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform