Skip to main content
Inspiring
March 14, 2007
Question

Query Fails to Bind

  • March 14, 2007
  • 1 reply
  • 409 views


I am passing the following query results through cfreport

SELECT user_name
,'' fullname
,'' present
,max(login_date) lastlogin
,max(logout_date) lastlogout
,max(date_updated) lastupdate
FROM Users
WHERE(user_name NOT IN ('AD', 'BR', 'TL, 'TC'))
group by user_name
ORDER BY user_name

Without lastlogin, lastlogout and lastupdate the report works fine.
When I try to use them I get a bind error on the report. I'm adding the variables under query fields. The report doesn't seem to see them.
Any ideas?
Thanks.
This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
March 29, 2007
And if you use the keyword "as"?

SELECT
user_name,'' as fullname, '' as present,
max(login_date) as lastlogin,
max(logout_date) as lastlogout,
max(date_updated) as lastupdate
FROM
Users
WHERE
user_name NOT IN ('AD', 'BR', 'TL, 'TC')
group by
user_name
ORDER BY
user_name