Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Multitable Insert Problem
"DA Morgan" <damorgan_at_psoug.org> wrote in message
news:1158970874.964898_at_bubbleator.drizzle.com...
> Dereck L. Dietz wrote:
> > I was trying to see if I could set up a multitable insert but kept
getting
> > errors. I eventually got the insert to the bare bones as I only wanted
to
> > have it work. It never did. I've never used a multitable insert so
please
> > excuse me if the problem is something very simple - I just can't see
what's
> > wrong right now.
> >
> > I was attempting the following insert while running under Oracle 10g R2.
I
> > was calling this from either a script file and one time put it in an
> > SQL*Plus window and received the same error both ways.
> >
> > The Insert:
> >
> > INSERT ALL
> >
> > INTO hmp_well_visits VALUES ( person_id )
> >
> >
> > INTO hmp_well_visits VALUES ( person_id )
> >
> >
> > SELECT DISTINCT a.person_id AS person_id,
> > a.mbr_key AS mbr_key,
> > a.mbr_sys_key AS mbr_sys_key,
> > a.clm_id AS clm_id,
> > a.clm_line_nbr AS clm_line_mbr,
> > a.clmdtl_key AS clmdtl_key,
> > a.srv_dt_from AS srv_dt_from,
> > a.cpt_hcpcs AS cpt_hcpcs,
> > a.proc_i_1 AS proc_i_1,
> > a.dtl_diag AS dtl_diag,
> > a.srv_prv_id AS srv_prv_id,
> > a.clm_src AS clm_src,
> > a.hcfa_pos AS hcfa_pos,
> > 'WV' AS hmp_disease_code,
> > '1' AS data_source
> > FROM hb_hmp_vclaim a
> > WHERE a.srv_dt_from >= TO_DATE('&1','MMDDYYYY')
> > AND a.person_id > 0;
> >
> > The error I kept getting:
> >
> > SP2-0734: unknown command beginning "INTO hmp_w..." - rest of line
ignored.
> > SP2-0734: unknown command beginning "INTO hmp_w..." - rest of line
ignored.
> > old 17: WHERE a.srv_dt_from >= TO_DATE('&1','MMDDYYYY')
> > new 17: WHERE a.srv_dt_from >=
TO_DATE('08022005','MMDDYYYY')
>
Thanks but I'm still totally baffled as to what is incorrect in my INSERT ALL statement. Received on Fri Sep 22 2006 - 20:09:57 CDT