Hi all
I'd like to retrieve data from shoppingcart table and show it in datagrid (A.aspx). So, Is this a cursor as previous reply,right?
DECLARE
cursor cCartList(CartID in varchar2) is
SELECT t.PRD_PRODUCTID,t.PRD_PRODUCTTITLE, s.QUANTITY, t.PRD_UNITPRICE, t.PRD_UNITPRICE * s.QUANTITY Sum
FROM TBLPRODUCT t, SHOPPINGCART t
WHERE t.PRD_PRODUCTID = s.PRODUCTID
AND s.CARTID = CARTID
ORDER BY t.PRD_PRODUCTTITLE;
My_ProductID VarChar;
My_ProductTitle VarChar;
My_Quantity Number;
My_UnitPrice Number;
My_Sum Number;
begin
for c1 in cCartList loop
Fetch c1 INTO My_ProductID,My_ProductTitle,My_Quantity,My_UnitPr ice,My_Sum;
EXIT WHEN c1%NOTFOUND;
INSERT NTO Temp VALUES (My_ProductID,My_ProductTitle,My_Quantity,My_UnitP rice,My_Sum);
COMMIT;
end loop;
end;
/
By Temp Table,I'll use its value to show in datagrid
Thanks
Blueman137