Jaraba wrote:
In Microsoft SQL I can run the following command:
insert into table execute proc1
to insert data into a table.
Is there a comparable way to do this in DB2?
DB2 distinguishes between functions and procedures.
INSERT INTO table SELECT * FROM TABLE(foo1(..)) AS F
Would be the equivalent.
That would be a table-functions (you have them in SQL Server as well).
You can also use scalar function if all you have is one return value.
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab