Query Of Queries runtime error
Hi,
I am in the process of upgrading my site from CF5 to CF9 and I am receiving a "Query Of Queries runtime error" on the following code whenever I add the first item to my shopping cart. If I add a second item, the error goes away. Here are the two key pieces of code where I pull the item information from the database and then use Query Of Queries to merge the product query with the shopping cart quantity.
<!--- Get Product Details --->
<CFQUERY NAME="GetDetails"
DATASOURCE="#request.ds#"
USERNAME="#request.dsuser#"
PASSWORD="#request.dspass#">
SELECT
ItemNo,
Item,
Grades,
Price,
ImageSmall
FROM Products
WHERE ItemNo IN (#QuotedValueList(GetCart.ItemNo)#)
</CFQUERY>
<!--- Add "OrderQty" Column --->
<CFQUERY NAME="GetList" DBTYPE="query">
SELECT
GetDetails.ItemNo AS ItemNo,
GetDetails.Item AS Item,
GetDetails.Grades AS Grades,
GetDetails.Price AS Price,
GetDetails.ImageSmall AS ImageSmall,
GetCart.Quantity AS OrderQty
FROM GetDetails, GetCart
WHERE GetDetails.ItemNo = GetCart.ItemNo
</CFQUERY>
This is the error I am receiving. The line number references the Q of Q above.
Query Of Queries runtime error.
Comparison exception while executing =.
Incompatible Type Comparison Exception: Left hand side and right hand side of the comparator operator "=" have incompatible types.
Left hand side expression type = "VARCHAR".
Right hand side expression type = "DATE".
I have tried many things to assign a type "string" to the right side but nothing appears to work.
I would greatly appreciate any help I can get as I have spent countless hours trying to figure this out.
Thanks,
Steve
