Also, remove the WHERE clause completely. Does it return anything?

Adrian

> -----Original Message-----
> From: Dave Phillips [mailto:[email protected]]
> Sent: 12 February 2009 17:39
> To: cf-newbie
> Subject: RE: Query returns empty when there is data
> 
> 
> What about the double quotes around the emp_no?  Is that doing it?
> Have you
> tried single quotes?
> 
> What is the type of emp_no column?  Try using cfqueryparam (which you
> should
> use anyway):
> 
> where emp_no = <cfqueryparam value="#getLocInfo.pnpocempno#"
> cfsqltype="cf_sql_varchar">
> 
> (if emp_no is not varchar, then use the correct cfsqltype).
> 
> Dave
> > -----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:4355
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to