Hi,
I need to copy data from one table to a newly created table. I tried the following Stored Procedure but could not get the syntax correct.
CREATE PROCEDURE "MmsBuyout"
INSERT INTO MmsPo (documentnumber,itemcode,ddate,unitused,descriptio n,qty,unitprice,taxamt,mms,buyout,budget) values
SELECT documentnumber,itemcode,ddate,unitused,description ,qty,unitprice,taxamt,
0,1,0 FROM historylines WHERE documentnumber >= 'PN105922' and itemcode like 'BO%'
Is there perhaps an easier way in P-Sql. I need to run it only once.
Thanks in advance.