Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2011
    Posts
    8

    Unanswered: Table creation inside a stored proc.

    Hi,


    I have a requirement to create a table by selecting values from another table from inside a stored procedure. Can I do that?

    I tried this statement:

    create table db2inst1.cust_kpi_Wtd_temp1 as(select * from db2inst1.cust_kpi_Wtd_temp);


    It gives me the error:

    SQL0104N An unexpected token ";" was found following "1.cust_cust_kpi_wtd_temp)". Expected tokens may include: <definition_Only>".

    I could create a table like
    "create table db2inst1.cust_kpi_Wtd_temp1(cust_id varchar(12), b_date date)"


    Thanks,
    Kayal.

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •