Ask a Question related to Coldfusion Database Access, Design and Development.
-
neilsytner #1
Help needed with Joining 2 Queries together
hi all.
i've got the following two queries and i'd like to combine them into one, and
i just can't figure it out. hoping someone here can get the old grey-matter
working again :)
basically i would like to display the dealerName (from the 1st query) that is
equal to the dealerID (in the 2nd query).
hope this makes sense!
thanks in advance for any replies.
regards,
Neil
<cffunction name="GetDealers" access="public" output="false"
returntype="query" hint="Get current list of dealerships.">
<cfset var qGetDealers = "" />
<cfquery name="qGetDealers" datasource="#variables.dsn#">
SELECT dealerID,
dealerName
FROM tblDealers
ORDER BY dealerName DESC
</cfquery>
<cfreturn qGetDealers />
</cffunction>
<cffunction name="GetOrderSummaries" access="public" output="false"
returntype="query" hint="Get current summary list of orders.">
<cfset var qGetOrderSummaries = "" />
<cfquery name="qGetOrderSummaries" datasource="#variables.dsn#">
SELECT orderID,
orderDateTime,
customerID,
dealerID,
orderNoCustomer
FROM tblOrders
ORDER BY orderDateTime DESC
</cfquery>
<cfreturn qGetOrderSummaries />
</cffunction>
neilsytner Guest
-
Queries Of Queries Single Quote Problem
When using queries of queries I'm having the following issue. Select Company_ID From qry_MyQuery Where Company_NM = 'MyString''s' <----... -
Joining Paths or joining two shapes
Hi, I have drawn threeleaves with the pen tool (closed paths). I would like to join these leaves to make a flower into which I want to place an... -
joining paths
I'm a freshman to Freehand and I can't figure out how to join open paths to a path once it has been closed. If it is possible can you fill it with... -
Joining these two queries
Can anyone help me to join Query 1 to Query 2 cheers rob Query 1 ------------- SELECT * FROM -
Urgent Help Needed ! JDBC driver crashes after 200 queries
Hi all, We have a major problem and need help. I've written a testing program which has several pieces of sql which we execute in a loop. After 191... -
neilsytner #2
Re: Help needed with Joining 2 Queries together
figured it out...
<cffunction name="GetOrderSummaries" access="public" output="false"
returntype="query" hint="Get current summary list of orders.">
<cfset var qGetOrderSummaries = "" />
<cfquery name="qGetOrderSummaries" datasource="#variables.dsn#">
SELECT O.orderID,
O.orderDateTime,
O.customerID,
O.dealerID,
O.orderNoCustomer,
D.dealerID,
D.dealerName
FROM tblOrders AS O,
tblDealers AS D,
WHERE O.dealerID = D.dealerID
ORDER BY O.orderDateTime DESC
</cfquery>
<cfreturn qGetOrderSummaries />
</cffunction>
neilsytner Guest



Reply With Quote

