Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One Works, One Doesn't
Message
 
To
26/06/2006 16:29:19
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
Miscellaneous
Thread ID:
01131819
Message ID:
01131824
Views:
15
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform