I am still running into problems

When I dump

This

<cfquery name="getjoin" datasource="bellccbatch" >
    Select BATCH_DATE from #variables.tablename#
</cfquery>

I get the  batch date.

But when I try this

<cfquery name="getjoin" datasource="bellccbatch" >
    Select BATCH_DATE from #variables.tablename#
    where #dateformat(getjoin.BATCH_DATE, "yyyymmdd")#|| '_fr.htm'
    IN <cfqueryparam list="yes"
    cfsqltype="cf_sql_char" value="#ValueList(getfiles.name)#">
</cfquery>

I get this error.

Element BATCH_DATE is undefined in GETJOIN.
Mike

   



----- Original Message -----
  From: Jochem van Dieten
  To: CF-Talk
  Sent: Tuesday, January 13, 2004 3:00 PM
  Subject: Re: Sub Query of a QofQ

  Mickael said:
  >
  > What you said makes sense just one thing.  In the myquery.thedate
  > value I will have a filename that is yyyymmdd_fr.htm can I look at
  > just the date in your example?

  Sure. But it is much easier to do it the other way around:

  <cfquery name="myquery" dbtype="query">
    select *
    from the QofQResult
  </cfquery>

  <cfquery datasource="mydsn">
    SELECT thedate
    FROM datetable
    WHERE thedate || '_fr.htm' IN <cfqueryparam list="yes"
      cfsqltype="cf_sql_date" value="#ValueList(myquery.thedate)#">
  </cfquery>

  Just make sure that datetable.thedate actually has the format of a
  yyyymmdd string (use the databases native string formatting functions
  if necessary).

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

Reply via email to