{"issue":{"milestone":{"creator":{"login":"Jach","id":159184,"url":"https://api.github.com/users/Jach","gravatar_id":"49cb434238ae04c786eb888a33591ad6","avatar_url":"https://secure.gravatar.com/avatar/49cb434238ae04c786eb888a33591ad6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"title":"0.9.4 M1","created_at":"2011-12-29T23:28:07Z","open_issues":2,"state":"open","due_on":null,"closed_issues":0,"number":4,"description":null,"url":"https://api.github.com/repos/Jach/testr/milestones/4"},"title":"[DDB-25] Create Table from Source Table UDP","created_at":"2011-12-29T23:30:14Z","user":{"login":"Jach","id":159184,"url":"https://api.github.com/users/Jach","gravatar_id":"49cb434238ae04c786eb888a33591ad6","avatar_url":"https://secure.gravatar.com/avatar/49cb434238ae04c786eb888a33591ad6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"updated_at":"2011-12-29T23:30:24Z","state":"open","labels":[{"name":"UDR Library","color":"0a79c6","url":"https://api.github.com/repos/Jach/testr/labels/UDR+Library"}],"id":2683887,"closed_at":null,"html_url":"https://github.com/Jach/testr/issues/39","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"[created=\"Sun, 14 Mar 2010 19:31:18 -0700\", resolved=\"Fri, 9 Apr 2010 06:10:03 -0700\"]\n<br /><br />\n<p>Create a UDP that will deduce, and optionally execute the DDL for a table.</p>\n\n        <p>call applib.CREATE_TABLE_FROM_SOURCE_TABLE ( source_table_or_view, target_schema, target_table_name, additional columns clause );</p>\n\n        <p>required:<br/>\n        source_table_or_view : the name of the source table, as a string.  Source Table can also be a fully qualified source table name \"server\".\"schema\".\"tableNAME\" or \"sCHemA\".\"tablE\"<br/>\n        target_table_name : the name, case sensitive, of the target table name</p>\n\n        <p>optional:<br/>\n        target_schema - the schema to create the new table in.  If null use the schema on the calling connection.<br/>\n        additional_columns_clause : a string with any additional column defintions to be present.  'ename VARCHAR(128) NOT NULL, dname VARCHAR(128) NOT NULL' will create the table as originally defined, and with the additional columns</p>\n\n        <p>test plan:<br/>\n        test to make sure datatypes, precision match (varchar(128) = varchar(128))<br/>\n        test to make sure it works with tables and views<br/>\n        test to make sure that it works with remote tables<br/>\n        test to make sure errors are thrown when:</p>\n        <ul class=\"alternate\" type=\"square\">\n        <li>Table already exists</li>\n        <li>additional columns clause is invalid</li>\n        <li>additional columns clause contains another column already in the table</li>\n        </ul>\n\n\n      ","number":39,"url":"https://api.github.com/repos/Jach/testr/issues/39","comments":8,"assignee":null},"comment":{"created_at":"2011-12-29T23:30:24Z","user":{"login":"Jach","id":159184,"url":"https://api.github.com/users/Jach","gravatar_id":"49cb434238ae04c786eb888a33591ad6","avatar_url":"https://secure.gravatar.com/avatar/49cb434238ae04c786eb888a33591ad6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"updated_at":"2011-12-29T23:30:24Z","id":3306525,"body":"[author=\"ngoodman\", created=\"Thu, 8 Apr 2010 20:01:30 -0700\"]\n<br /><br />\n<p>Ray,</p>\n\n          <p>I'd like to add an additional requirement.</p>\n\n          <p>The source table input, if a simple table name, should try and access tables in the default schema.  The following two statements below should be successful:</p>\n\n          <p>Once that is complete, and additional test cases are added to .sql/.ref this task is completed.</p>\n\n          <p>0: jdbc:luciddb:<a href=\"http://localhost\">http://localhost</a>> create schema xyz;<br/>\n          No rows affected (1.115 seconds)<br/>\n          0: jdbc:luciddb:<a href=\"http://localhost\">http://localhost</a>> set schema xyz;<br/>\n          Error: From line 1, column 8 to line 1, column 12: Unknown identifier 'XYZ' (state=,code=0)<br/>\n          0: jdbc:luciddb:<a href=\"http://localhost\">http://localhost</a>> set schema 'XYZ';<br/>\n          No rows affected (0.318 seconds)<br/>\n          0: jdbc:luciddb:<a href=\"http://localhost\">http://localhost</a>> create table t1 (c1 int);<br/>\n          No rows affected (0.501 seconds)<br/>\n          0: jdbc:luciddb:<a href=\"http://localhost\">http://localhost</a>> call applib.create_table_from_source_table('T1', null, 'T1_TARGET', null);<br/>\n          Error: java.lang.Exception: <a href=\"https://studio.dynamobi.com/wiki/display/DDB/ErrorInfo\">ErrorInfo</a>: Source table or view<a href=\"https://studio.dynamobi.com/wiki/display/DDB/T1\">T1</a> is invalid.<br/>\n          <span class=\"error\">&#91;Create Table SQL:&#93;</span> (state=,code=0)<br/>\n          0: jdbc:luciddb:<a href=\"http://localhost\">http://localhost</a>> call applib.create_table_from_source_table('\"T1\"', null, 'T1_TARGET', null);<br/>\n          Error: java.lang.Exception: <a href=\"https://studio.dynamobi.com/wiki/display/DDB/ErrorInfo\">ErrorInfo</a>: Source table or view<span class=\"error\">&#91;\"T1\"&#93;</span> is invalid.<br/>\n          <span class=\"error\">&#91;Create Table SQL:&#93;</span> (state=,code=0)</p>\n        ","url":"https://api.github.com/repos/Jach/testr/issues/comments/3306525"},"action":"created"}