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:
01036948
Views:
18
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>I'm trying the following SQL:
>
>
>IF NOT m.tlAddEmptyRecord
>TEXT TO lcSQLStr NOSHOW PRETEXT 7
>SELECT DISTINCT padr(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
> WHERE ##FILTER## ORDER BY 1
>ENDTEXT
>ELSE
>TEXT TO lcSQLStr NOSHOW PRETEXT 7
>SELECT padr(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
> WHERE ##FILTER##
> UNION
> SELECT SPACE(50) as cEmpName, SPACE(10) as cUserID, null as cUsGrLink_pk
> FROM Users WHERE 1=0 ORDER BY 1
>ENDTEXT
>ENDIF
>
>I want to include one empty row in the resulting cursor. I guess, my only alternative is to create a cursor with empty row and join it in the Select. We're going to switch to 9 in a week, but I want this program to work now in VFP8.
>
>Thanks in advance.


Make the cursor ReadWrite and after select just APPEND BLANK :o)
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