Ask a Question related to Coldfusion Database Access, Design and Development.
-
KimMazz #1
Need all employees in query
I have a sql query to an access database. It returns employee information
from the employees table and connects each employee to the programs they run
from the programs table. The problem I am having is that if the employee
does NOT head any programs their information is not being returned in the
query.
The ProgramContact is the Emp_ID from the employee table. So if the Emp_ID
is not in the Programs table then the employee doesn't get listed in the
output.
My question, what do I have to change to get the query to return all
employees regardless of whether they head a program or not?
help Please,
Kim
<cfquery name="rsGetEmployeeList" datasource="#request.dsn#">
SELECT yda_Employees.Emp_ID, yda_Employees.Emp_Role,
(yda_Employees.Emp_FirstName) + ' ' + (yda_Employees.Emp_LastName) AS
EmployeeContact, yda_ProgramsServices.Program_ID,
yda_ProgramsServices.ProgramTitle, yda_ProgramsServices.District
FROM yda_Employees INNER JOIN yda_ProgramsServices ON yda_Employees.Emp_ID =
yda_ProgramsServices.ProgramContact
GROUP BY yda_Employees.Emp_ID, yda_Employees.Emp_Role,
yda_Employees.Emp_FirstName, yda_Employees.Emp_LastName,
yda_ProgramsServices.Program_ID, yda_ProgramsServices.ProgramTitle,
yda_ProgramsServices.District
ORDER BY yda_Employees.Emp_ID ASC, yda_ProgramsServices.District DESC
</cfquery>
KimMazz Guest
-
Writting to employees.xml
Good day Everyone, though bumpy I have managed to install Flex and all its good stuff on Windows XP and Server 2000 along with Jrun and Coldfusion... -
Query of Queries on query New type query
In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could... -
To all Freehand Employees(a stumper)
I have asked this question on 2-3 different occassions in the past with NO response so I will try it again. I have a problem when collecting for... -
Sun Microsystem is mandating their employees to use Netscape for email
A Sun employee told me that SUN is mandating all their employees to switch to "Netscape" for MUA (mail user agent). Dtmail / Pine / elm / mush,... -
BCP query out executed by xp_cmdshell works fine from query analyzer but fails from VB Component
Hi all, I have a stored procedure which returns a vast number of record and i have to write the output into a csv file. I'm using BCP utility to... -
JMGibson3 #2
Re: Need all employees in query
Change INNER JOIN to LEFT JOIN, be aware that everything from the second table will be NULL if you're tempted to add WHERE clauses (and it's a slick way to zero in on those who are missing).
JMGibson3 Guest
-
KimMazz #3
Re: Need all employees in query
Thank You!! I knew I had to change the join, but I didn't know what to
change it to.
Kim
"JMGibson3" <webforumsuser@macromedia.com> wrote in message
news:dvmovg$hpt$1@forums.macromedia.com...> Change INNER JOIN to LEFT JOIN, be aware that everything from the second
> table will be NULL if you're tempted to add WHERE clauses (and it's a
> slick way to zero in on those who are missing).
KimMazz Guest



Reply With Quote

