this is the query i have so far that gives the correct result set...

<cfquery name="get" datasource="#Request.App.dsn#" 
password="#Request.App.DBpassword#" username="#Request.App.DBusername#">
SELECT     TOP 100 dbo.orders.dCreated, dbo.orders.order_id, 
dbo.address_book.customer_fname, dbo.address_book.customer_lname, 
dbo.products.product_id, 
                      dbo.categories.cat_id, 
dbo.categories_description.cat_title, dbo.products_description.product_title
FROM         dbo.products_to_categories INNER JOIN
                      dbo.categories ON dbo.products_to_categories.cat_id = 
dbo.categories.cat_id INNER JOIN
                      dbo.address_book INNER JOIN
                      dbo.orders ON dbo.address_book.customer_id = 
dbo.orders.customer_id INNER JOIN
                      dbo.orders_products ON dbo.orders.order_id = 
dbo.orders_products.order_id INNER JOIN
                      dbo.products ON dbo.orders_products.product_id = 
dbo.products.product_id ON 
                      dbo.products_to_categories.products_id = 
dbo.products.product_id INNER JOIN
                      dbo.categories_description ON dbo.categories.cat_id = 
dbo.categories_description.cat_id INNER JOIN
                      dbo.products_description ON dbo.products.product_id = 
dbo.products_description.product_id
WHERE     (dbo.categories.cat_id = 1) AND 
(dbo.categories_description.language_id = 'en_US') AND 
(dbo.products_description.language_id = 'en_US')
ORDER BY dbo.address_book.customer_lname, dbo.orders.dCreated DESC
</cfquery> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286891
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to