Never gave it much thought. I am not the original author of this code. There is not need for DISTINCT. I am going to remove it when I get to work today > Not sure what's happening, but wondering if "DISTINCT" is > causing a problem. Why do you need "distinct" when you're > using a "where" clause? > > Is there more than one possible correct answer to your query? > > Rick > > > -----Original Message----- > > From: Servando Garcia [mailto:[email protected]] > > Sent: Thursday, February 12, 2009 11:12 AM > > To: cf-newbie > > Subject: Query returns empty when there is data > > > > > > Hello all > > Thanks in advance for the help. I have a query that returns nothing > when there is data in the > database. > > Here is the query > > > > <CFQUERY datasource ="#dataMain#" name ="pnpocData"> > > SELECT DISTINCT emp_Fname, emp_Lname, office_telephone, > standard_e_mail_addr > > from vw_Employee_data > > where emp_no = "#getLocInfo.pnpocempno#" > > </CFQUERY> > > > > I have used CFDUMP to verify that the employee number is correct in > the where condition of the > query. I > > even used CFABORT to stop and view the query. I then copied the > query after interpolation into > TOAD and > > ran the query as is. Worked fine > > > > When i use CFDUMP after the query runs pnpocData is empty. > > > > Any ideas? > > > > > > Sam > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4356 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
