|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Union Query - Undefined
I am trying to run the following query but I get a "Variable CALID (Replace CALID with any variable) is undefined"
If I do a cfdump the query returns the right results. If I do each query seperatly I do not get the undefined error. However, when I add use the UNION to combine the queries, I get the undefined error. The query is as follows: <cfquery name="Testunion" datasource="cscms"> SELECT AGREEMENT_END_DATE, ID FROM Data1 WHERE Data1.AGREEMENT_END_DATE IS NOT NULL AND Data1.AGREEMENT_END_DATE Between Now() and Now ()+360 AND Data1.REQUESTING_DEPT = 'IT' UNION ALL SELECT EventDate, CalID From Calen WHERE Calen.EventDate IS NOT NULL ORDER BY Data1.CONTRACT_END_DATE, Data1.ID, Calen. EventDate </cfquery> ------------------------ Now maybe there is a better way to this, but I am trying to take the information from the Data1 Table and the Calen Table and display it in rows by date order. Any help would be greatly appreciated, I spent enough time trying to figure this out already, so that must mean the answer is simple. ![]() |
|
#2
|
|||
|
|||
|
General SQL debugging tips:
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Union Query - Undefined |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|