Hello All,

I am running into an issue with something that I am trying to do.  I have a directory with files that are named YYYYMMDD_fr.htm and I have a database that has a record for each day for the next few years.  What I am trying to do is return records from my database where a file exists in my directory.

Here is what my code looks like

<cfdirectory
    action=""
    directory="#thisdirectory#\#variables.reportfolder#"
    filter="*_fr.htm"
    name="GetFiles">
   
    <cfdump var="#GetFiles#">
      
    <cfquery name="getccrecords" datasource="#DSN#">
         select * from #variables.tablename#
      where batch_date <= #now()#
      order by batch_date desc
    </CFQUERY>
    <cfdump var="#getccrecords#">
   
    <cfquery dbtype="query" name="GetJoin">
    Select * from GetFiles, GetCCRecords
    where 'Left(GetFiles.Name,8)' = '#dateformat(GetCCrecords.BATCH_DATE, "yyyymmdd")#'
   
    </cfquery>

When I look at the SQL output I get this,

Select * from GetFiles, GetCCRecords
where 'Left(GetFiles.Name,8)' = '20040113'

There is something that I am missing here because I get zero records in my QofQ where there should be.

Thanks

Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to