How to manage the date in cfquery?

Hello

I have a (qVIEW) query that selects a date (which is a column in a table).

Now, I want to loop through the first query (qVIEW) and then perform another query inside (qRate).
In fact, my problem is with the 'where' statement qRate I want to put:

where "...". and tbl_daily.adate = qVIEW.lastdate.

I added it (see below), but it gives me error.
I mistakenly put this line?

Any help would be much appreciated.

THX



< cfset local = SetLocale ("English (UK) '") >

< cfquery name = "qVIEW" datasource = "mydb" >
Select
tbl_view. Name as MyName,
tbl_view. LASTDATE as lastdate
of tbl_view
< / cfquery >




< cfloop query = "qVIEW" >

< cfquery name = "qRate" datasource = "mydb" >
Select
tbl_daily.rate rate
of tbl_daily, tbl_names
where
tbl_names. Names = "#qPL.myname #".
and tbl_names.id = tbl_daily.id
and tbl_daily.adate = qVIEW.lastdate <!-THIS PART IS GIVING ME ERROR - >
tbl_daily.id desc order
< / cfquery >

< / cfloop >



If I understand this... put # qVIEW.lastdate all about it looks like this

and tbl_daily.adate = #qVIEW.lastdate #.

and it should work. If lastdate is a variable from another query, you must exit # for your new request to know what it represents...

otherwise your request will try to look into tbl_daily.adate with a value of "qVIEW.lastdate".

I hope this helps.

P.S. If that solved the problem, you may also need to change the line of the top (and tbl_names.id = tbl_daily.id) to include # also: and tbl_names.id = #tbl_daily.id #.

Tags: ColdFusion

Similar Questions

  • How to manage the data after the serial com port?

    Hi all

    I'm new to labview and serial communication. I tried to receive data on external device labview (pic18f452). It's done, but I am getting data as strings. If microcontroller gives "11.25", in labview each letter is delivered to a different as string ("1""1" "". "") "2" "5").. How can I manage data... to make it unique as 11.25, a number constant.

    If possible, join some examples with your answers... Thanks in advance.

    It seems that you read too fast, read up what an endcharacter probably puts the characters in a string that can translate the string of numbers conversion routines in the palette of the chain.

  • How to manage the Data Association output when no line not returned?

    BPM 11 g, I use a Service to select a line in an external database in passing a parameter using a database adapter.  Works fine when a row is returned.  But if no row is returned (which can happen, because no match is not found on the selection based on the value of the parameter), I get an error on the composite as output data Association has return values, including integers, mapped to a data object, I defined in the process.  Well, if no row is found, the integer value is empty and mistakes to try to save him.

    How to handle this situation?

    The specific message is:

    The expression bpmn:getDataOutput('wm91AInterfaceMainCollection') / ns:Wm91AInterfaceMain [1] / ns:board is empty. An attempt to read or copy the referenced data or calculated by the XPath generated invalid data, according to the XML schema, or did not contain some optional data. Ensure that the variable result or expression named in the error message is not empty. Enable related data elements XML schema validation for the enforcement data are valid.

    I must be missing something obvious here, but can't find a way to handle this.  Thanks in advance!

    Hey Joe,

    Of course, others will be have another idea, but opt for the XSLT option for mapping your data.  Using XSLT, you can check for null in an 'if '.

    Dan

  • How to reset the data counter without resetting the phone

    How to reset the data counter each month so that I can control my data counter with our reset the phone (or) without using factory data reset.

    Thanks for the reply much appreciated.

    Parameters

    Data Manager

    Press the lower left key

    Reset the data counter

  • I would like to know how to manage the ASN.1 encoding/decoding in LabView?

    I would like to know how to manage the ASN.1 encoding/decoding in LabView?

    Hello J,

    in the example given here , it looks like a format simple bytestream...

    You must read the byte stream, get the first and the second byte to decode the data type and length and then read & catalogued according to number of bytes. And then read 2 bytes and so on...

    Encoding will work the same but in reverse

  • How to print the date on the pictures

    Can someone advise please how to print the date the pictures on my HP C6380 All in one printer.  I managed to change the settings to do that before, but now it's me beating.  I have a fault if I can.

    Thus, because there is no date and time setting on the printer that you will use the software you have to super impose a time and date on the photo.  Then print it on the printer.

  • How to manage old data?

    It is a very generic question. We use the oracle database. We hold the records of the company in the database. The company records should be available at any time, but over the years that the database continues to grow. Now, how to manage old data. All data are important, but if this is true for several years yet we more and more disk space to manage. Are there effective methodologies to manage old data? For us the old means data that are 10 years old.

    Murray9654 wrote:

    My main concern is the number of disks required. The database continues to grow for years. So how long can we continue to increase the record. It is not about the cost. I'm not sure of what will be the amount of data after 30 years.

    If the cost is not a concern, number of disks shouldn't be a concern.  In the end, you need what it takes to take what you have.  There's no silver bullet to get 50 gallons of sewage in a 10 gallon tank.  How big is your database now?  What is your current disk arragnement - local disks, SAN, NAS...

    Your statement "should be available at any time" seems to eliminate the storage of archives, out-of-database as a band.

  • Anyone know how to check the date of warranty until when?

    Anyone know how to check the date of warranty until when?

    https://checkcoverage.Apple.com/Jo/en/;JSESSIONID=9pJ0X9pFPJtNg3c44yDGCvk9pVpt5l QSgn4B60y4Skv1WfmnqMkF!-1840326800

  • How to find the date item was my favorites on Mozilla Firefox

    on system moot bookmark how to find the date of the bookmark?

    In bookmarks menu select organize bookmarks to open the bookmarks library. In the bookmarks library, click views, and then display the columns and then added. This will display a column showing when a bookmark has been added.

  • How to set the date and time on my HP Officejet pro 8600 more?

    How to set the date and time on my HP officejet pro 8600 more?  It just on a printed journal Jan-oo-oo fax shows 00:00 AM.  There are no instructions on how to change this.  I need proof that I sent a fax to a certain date and time.  Help, please.  Thank you

    Hello

    Below are the steps to set the Date and time for your device:

    1. On the Control Panel, press the right arrow key ( ), press Setup ( ).

  • Camileo S20 - How to display the date and time

    Hi, all. I got as Christmas present the Camileo S20, and I am not able to view the date and time in the video. In the manual is no reference on this subject, only how to set the date and time. But what is the intention to set the date and time in the camera, if it is not possible to display video?

    Hello

    Have you checked the user manual of your TV cam?

    If it of possible to display the data and the time you can find in your user manual how to do this. It always interesting to read ;) s

  • How to save the data in table 1 d to Excel in continuous

    Mr President.

    How to save the data in table 1 d to Excel at all times, so that all the data of the first scan must be placed first thought and all the data from the second analysis must be placed on the second Board and continue on the street...

    Sy@m...

    Hi Sy@m

    Here is a vi that might give you a few ideas to try:

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • How to analyze the data of the cDAQ and Signal Express, especially after analysis?

    In the first series of tests of my instrument, it took longer than expected for the race.  Thus, the data was saved in 6 days.  The file is too large for export to Excel.  At the beginning of the project, I was as ignorant as I could go ahead and add analysis and the scaling of measures.  By the scaling, I mean my data of switching current dew points or whatever it is that I record.

    How to evolve the data to read the output data as expected 4mA = point of dew of-20 C or 0 PSIG?  Can I pre program this to be recognized for each event?

    For real analysis I am doing – I would first analyze the data I recorded and choose different points to send to Excel to graph and analyze.  Is this possible?

    Secondly, I would like to know how to scale and analyze my data in the project without having to do this later analysis in the future?

    I have a cDAQ-9172 with LabVIEW signal Express 3.0 that uses four modules - 9211 2 modules of thermocouple, my 4-20 1-9201 module +/-10V module and 1-9203.

    Thank you for any assistance.

    Hi Patricia,

    "' You can do this by adding a step Load/Save signals ' analog '.  I hope this helps!

  • How to set the Date and time on a remote target in Measurement &amp; Automation Explorer (MAX)?

    Hello

    I'm trying to follow the steps described in the following link:

    How to set the Date and time on a remote target in Measurement & Automation Explorer (MAX)?

    It is said

    The software on the target currently supports only the time zoneand deletes the old files?

    I need set the date and time

    and remove all the old unwanted files

    the calendar was gray does not allow me to change the current date.

    Anyone know how to change

    Hi all!

    According to this the below Knowledge Base article, Remote Configuration System Support must be installed on the target for time settings to change in MAX.

    http://digital.NI.com/public.nsf/allkb/FAB0EC4D6E5EE0F386257738005733A3?OpenDocument&MeTC=max_MAXDat...

    If you don't know what version of the system supported remote Configuration software that you have installed on your device target, it is likely that it is not yet installed. Add this software by clicking below your target to the MAX software option and selecting "Add/Remove Software". This is where you will install the System Configuration Remote Support software.

    Please let us know if you have any questions!

Maybe you are looking for

  • How can I me private navigation back?

    New incognito under file isn't there. I don't know how to get into the web on Firefox.

  • Everything works, but does not connect my Satellite U940

    Hi all I'm trying to connect my Satellite U940-101 to my network at home.Everything works (wifi is doing well on other devices)Also the satellite itself will recognize my wireless network, that asks for the key, and lets me know when I enter for exam

  • Drivers for p - 164 ca

    Hey,. I can't find driver for my Pavilion 15 p - 164 ca downloads. I just did a clean install of the operating system (Windows 8.1), and there are several missing drivers. I found a list of them three days ago, but I can't find it anywhere now.

  • Updating Intel Pentuim D...

    Can I update for intel pentuim inside... like going to a link and download a file that transforms pentuim inside my system

  • My screen is magnified/too big

    Community salvation; Recently, I replaced my hard drive (old caught a virus), and now the display (desktop and Web pages) is too big for the screen. The only way I can see any part of the perimeter is too move slider all the way to the left (etc.) to