I tried the Group By in both the SQL statement, and the Output.
It now gives me one Franchise # and one Name, but it does not fill in the
rest of the responsibilities!
FSC # Franchise Controller Analyst Revenue AP Payroll Processor
1 PAC PIZZA Bob
3 IQ Investments (3) Erin
4 IQ Investments (4) Darla
5 WKRP Charlie
7 IQ Investments (7) Erin
8 IQ Investments (8) Erin
9 IQ Investments (9) Erin
12 Sky Ventures LLC Randy
13 Sky Ventures (2 in 1) Randy
-----Original Message-----
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 3:05 PM
To: CF-Talk
Subject: Re: [RE: Database/CF easy problem for someone.]
try the group attribute in <cfoutput>
Corrine Clark <[EMAIL PROTECTED]> wrote:
Actually I have no problem with my IFs, they do what I want, which is
display the firstname of the person associated with the Dept.
I want one table row for each Company number and Name on a line with the
Responsibility, like so:
FSC # Franchise Controller Analyst Revenue AP
PayrollProcessor
95 2JR Tony Sheryl Vickie Tim Virginia
Not each on its own line. And not all in one line.
--------------------------------
Message-id: <850102F6DB16D4119D5C0090272895E21F08CF@FSCSERVER2>
I am pulling info from my database and trying to display in a table.
Here is my code
<cfquery name="getDeptR" datasource="fsc_intranet">
SELECT company.cono, company.coname, fsc_personnel.FirstName,
fsc_personnel.employeeid, fsc_personnel.email,
company_responsibility.cono, company_responsibility.roleid,
company_responsibility.employeeid
FROM company RIGHT JOIN (company_responsibility RIGHT JOIN FSC_personnel
ON [company_responsibility].[employeeid]=[FSC_personnel].[employeeid])
ON [company].[CONO]=[company_responsibility].[CONO]
Where company.cono > 0
Order By Coname ASC
</cfquery>
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<td>FSC #</td>
<td>Franchise</td>
<td>Controller</td>
<td>Analyst</td>
<td>Revenue</td>
<td align="center">AP</td>
<td>Payroll Processor</td>
</tr>
<cfoutput query="getDeptR">
<tr>
<td align="center">#NumberFormat(getDeptR.cono,'___')#</td>
<td>#getDeptR.Coname#</td>
<td><cfif #getDeptR.roleid# eq 9>#getDeptR.Firstname#</cfif></td>
<td><cfif #getDeptR.roleid# eq 10>#getDeptR.Firstname#</cfif></td>
<td><cfif #getDeptR.roleid# eq 1>#getDeptR.Firstname#</cfif></td>
<td><cfif #getDeptR.roleid# eq 3>#getDeptR.Firstname#</cfif></td>
<td><cfif #getDeptR.roleid# eq 2>#getDeptR.Firstname#</cfif></td>
<tr>
</cfoutput>
</table>
Here is what displays
Department Responsibilities
<<...>>
FSC # Franchise Controller Analyst Revenue AP Payroll
Processor
95 2JR Sheryl
95 2JR Vickie
95 2JR Crystal
95 2JR Tim
95 2JR Tony
69 AG Hospitalities Virginia
69 AG Hospitalities Charlie
69 AG Hospitalities Joanne
98 ALTES Darla
98 ALTES Vickie
98 ALTES Erin
98 ALTES Shannon
98 ALTES Chris
And I want it on one line. Can anyone help?
--
NOTICE OF CONFIDENTIALITY
~~~~~~~~~~
This message and all attachments are confidential. It is intended only for
the use of the person to whom it is addressed. If the message is not
addressed to you, then you should immediately notify the sender and delete
this message. Any use or retransmission of this message by a person other
than the intended recipient is strictly prohibited and may violate state or
federal law.
Franchise Services Company, LLC, its subsidiaries, affiliates, and
employees, do not accept liability for any errors, omissions, corruption or
virus in the contents of this message or any attachments that arise as a
result of e-mail transmission.
~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists