Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One Works, One Doesn't
Message
 
À
26/06/2006 16:29:19
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
Divers
Thread ID:
01131819
Message ID:
01131824
Vues:
16
This message has been marked as the solution to the initial question of the thread.
You must pass it as parameter or assign directly the value of sqlresults.untypeid
I prefer this way (more visible and with syntax coloring)
TEXT TO lcSelect NOSHOW PRETEXT 15 TEXTMERGE
     SELECT b.* 
            FROM Table1 a
            INNER JOIN Table2 b on LTRIM(RTRIM(a.unitcode)) = LTRIM(RTRIM(b.unitcode))
                                AND LTRIM(RTRIM(a.unittype)) = LTRIM(RTRIM(b.usertyped))" ;
            WHERE a.inactive = 'TRUE' AND
                  a.untypeid = <<sqlresults.untypeid>> -- If untypeid type is differenet than numeric you must convert it
ENDTEXT

* or
TEXT TO lcSelect NOSHOW PRETEXT 15 TEXTMERGE
     SELECT b.* 
            FROM Table1 a
            INNER JOIN table2 b on LTRIM(RTRIM(a.unitcode)) = LTRIM(RTRIM(b.unitcode))
                                AND LTRIM(RTRIM(a.unittype)) = LTRIM(RTRIM(b.usertyped))" ;
            WHERE a.inactive = 'TRUE' AND
                  a.untypeid = ?sqlresults.untypeid -- No convertion needeed
ENDTEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform