Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include NULL in the result
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01036945
Message ID:
01037015
Views:
19
>This is what I currently have for VFP9. The returning result is correct:
>
>
>SELECT DISTINCT padr(PROPER(ALLTRIM(Employees.cEmployee_first_name) + SPACE(1) + ;
>	Employees.cEmployee_last_name), 50) AS cEmpName, ;
>   Users.cUserID, Usgrlink.cUsgrlink_pk  ;
>	 FROM Users INNER JOIN USGRLINK ;
>   ON Users.iID = Usgrlink.iUserID ;
>    INNER JOIN EMPLOYEE_TEAMS ;
>   ON Employee_teams.cEmployee_teams_pk = Usgrlink.cEmployee_teams_fk ;
>   INNER JOIN EMPLOYEES ;
>   ON Users.cUsers_pk = Employees.cUsers_fk ;
>   INNER JOIN Departments on Employee_teams.cDepartments_fk = Departments.cDepartments_pk ;
>   UNION ;
>   SELECT SPACE(50) as cEmpName, SPACE(10) as cUserID, CAST(null as C(16) NULL) as cUsGrLink_pk FROM Users
The question you should ask is not if it'll work but how efficient it'll be. I guess that Users table is small so efficiency may not be an issue for you.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform