Well, you spelled "order" wrong in the where statement.  Could it be 
that simple?

Ray

Torrent Girl wrote:
> Please critique my stored proc
> 
> I am new at creating stored procs and did some research on google regarding 
> the process.
> I found multiple ways of creating one and came up with a simple proc on my 
> own based on
> my findings.
> 
> Please critique my stored proc and let me know if I should add or remove 
> anything
> 
> 
> Thanks
> TGirl
> 
> 
> CREATE OR REPLACE Procedure spDeletePastOrderSavedRecords
> AS
> 
> BEGIN
> DELETE  o.orderid, o.name, o.description
> FROM    orders o INNER JOIN 
>               products p ON o.productID = p. productID                 
> WHERE         MAX(o.oder_date) <= ADD_MONTHS(CURRENT_DATE, -2)
> 
>   commit;
> END;
> /
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
This list and all House of Fusion resources hosted by CFHosting.com. The place 
for dependable ColdFusion Hosting.
http://www.houseoffusion.com/banners/view.cfm?bannerid=11

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1052
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to