Merlin writes”
first, the way to do insert from composite type is like this:
insert into foo select (f).*;
if f is type of foo. The actual error you're getting is probably….”
I gave this a try. Still bumping into syntax errors
CREATE TYPE oww_mart_tbls.type_log_site_process AS
(proc_id integer,
proc_name character varying(500),
step_id integer,
step_desc character varying(2000),
step_starttime timestamp without time zone,
step_endtime timestamp without time zone,
step_returncode character varying(500),
activity_count integer,
status_flag character varying(1),
status_desc character varying(2000));
ALTER TYPE oww_mart_tbls.type_log_site_process
OWNER TO gpadmin;
Create function …
DECLARE
-- standard variables
vSpReturn_code text;
Logsp oww_mart_tbls.type_log_site_process%ROWTYPE;
…..
insert into oww_mart_tbls.log_site_process(proc_id, proc_name, step_id, step_desc, step_starttime, step_endtime, step_returncode, activity_count, status_flag, status_desc)
select (logsp).*;
works.
Thanks for the help.
Doug Little
Sr. Data Warehouse Architect | Business Intelligence Architecture | Orbitz Worldwide
500 W. Madison, Suite 1000 Chicago IL 60661| Office 312.260.2588 | Fax 312.894.5164 | Cell 847-997-5741
Douglas.Little@orbitz.com
orbitz.com | ebookers.com | hotelclub.com | cheaptickets.com | ratestogo.com | asiahotels.com