Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Query of queries testing for null or empty dates

Community Beginner ,
May 18, 2006 May 18, 2006
I'm having problems with this query (within a function). The last condition in the where clause needs to check for an empty or null date and then check against the current date (which is fine), im aware that the syntax is wrong but wondered if someone could correct it for me to get it working.

<cfquery name="filterQuery" dbtype="query" maxrows="#arguments.top#">
select * from getAllSaved
where
workFlowStatusId = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#application.const.WORKFLOW_LIVE#" />
and
dateArchive > <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#" />
and
dateLive <= <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#" />
and
(dateExpiry is null or dateExpiry = '') or dateExpiry > <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#" />
</cfquery>
770
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , May 23, 2006 May 23, 2006
I feel stupid, although i'd put a fiver on having tried that!

thanks
Translate
LEGEND ,
May 18, 2006 May 18, 2006
Take away the check for an empty string.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 23, 2006 May 23, 2006
I feel stupid, although i'd put a fiver on having tried that!

thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 23, 2006 May 23, 2006
LATEST
I feel stupid, although i'd put a fiver on having tried that!

thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2006 May 18, 2006
Take away the check for an empty string.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources