I have a complex SELECT stmt that I would like to use to copy (insert) records into another table.
I tried placing "INSERT INTO table-name" in front but that doesn't work.
How can I change this SELECT to insert the result set into a different file?
with MISCCHGSRC as (
select * from miscchg A
(select * from miscchgplg b
a.ASHPNBR = b.ashpnbr
and a.ABLDNGD = b.ABLDNGD )
select * from miscchgplg
select ASHPNBR,ABLDNGD,APLSQNB,AMSCHRG,sum(AMSCHRG2) chgamt,
left outer join tcmisdb/ctltable
on CTLTABLE = 'MISCCHG' and AMSCHRG = CTLELEMENT
group by ASHPNBR,ABLDNGD,APLSQNB,AMSCHRG,CTLTEXT1
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com