Created
November 22, 2022 17:13
-
-
Save trycf/84c7aba7724179ac2616fbccddc91d64 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset Query1 = QueryNew("Fruit")> | |
<cfset QueryAddRow(Query1, 2)> | |
<cfset temp = QuerySetCell(Query1, "Fruit", "Apple", 1)> | |
<cfset temp = QuerySetCell(Query1, "Fruit", "Orange", 2)> | |
<cfset Query2 = QueryNew("Fruit")> | |
<cfset QueryAddRow(Query2, 2)> | |
<cfset temp = QuerySetCell(Query2, "Fruit", "Apple", 1)> | |
<cfset temp = QuerySetCell(Query2, "Fruit", "Pear", 2)> | |
<cfquery dbtype="query" name="Query3"> | |
SELECT Fruit FROM Query1 | |
UNION | |
SELECT Fruit FROM Query2 | |
ORDER BY Fruit | |
</cfquery> | |
<cfoutput><cfdump var="#Query3#"></cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment