Method, system, and program for inverting columns in a database table
First Claim
Patent Images
1. A method for transforming an input table comprised of multiple columns and rows, comprising:
- copying, for each column, data from one column in the input table into one row in an output table to invert the input table;
determining whether a sequential number column is provided, wherein the data from the column in the input table is copied into the output table row starting from a column following the sequential number column in the output table if the sequential number column is provided; and
inserting sequential numbers into the sequential number column in the output table to sequentially number the rows of the output table if the sequential number column is provided.
3 Assignments
0 Petitions
Accused Products
Abstract
Disclosed is a method, system, program, and data structure for transforming an input table. The input data table is comprised of multiple columns and rows. For each column, the data from one column in the input table is copied into one row in an output table to invert the input table.
55 Citations
22 Claims
-
1. A method for transforming an input table comprised of multiple columns and rows, comprising:
-
copying, for each column, data from one column in the input table into one row in an output table to invert the input table;
determining whether a sequential number column is provided, wherein the data from the column in the input table is copied into the output table row starting from a column following the sequential number column in the output table if the sequential number column is provided; and
inserting sequential numbers into the sequential number column in the output table to sequentially number the rows of the output table if the sequential number column is provided. - View Dependent Claims (2, 3, 4, 5, 6, 7)
determining whether the data in the input table columns inverted into the rows in the output table form at least one output table column having a first and second data types, wherein the first and second data types are different;
determining whether the first and second data types in the output table column are in a promotion path, such that the first data type is capable of being promoted to the second data type; and
promoting the data in the output table column having the first data type to the second data type if the first data type is capable of being promoted to the second data type.
-
-
6. The method of claim 1, wherein copying the data from one column in the input table to one row in the output table comprises copying the data from the column in the input table into a row starting from a column in the output table following a first column.
-
7. The method of claim 6, wherein the column in the output table including data from the first row in the input table is provided a column name.
-
8. A method for transforming an input table comprised of multiple columns and rows, comprising:
-
determining whether a sequential number column is provided;
copying data from column in the input table into output table row starting from a column following a first two columns if the sequential number column is provided;
copying the data from the column in the input table into the output table row starting from the column following a first column if the sequential number column is not provided; and
inserting sequential numbers into one of the first two columns in the output table to sequentially number the rows of the output table if the sequential number column is provided.
-
-
9. A system for transforming an input table comprised of multiple columns and rows, comprising:
-
means for copying, for each column, data from one column in the input table into one row in an output table to invert the input table;
means for determining whether a sequential number column is provided, wherein the data from the column in the input table is copied into the output table row starting from a column following the sequential number column in the output table if the sequential number column is provided; and
means for inserting sequential numbers into the sequential number column in the output table to sequentially number the rows of the output table if the sequential number column is provided. - View Dependent Claims (10, 11, 12, 13, 14)
means for determining whether the data in the input table columns inverted into the rows in the output table form at least one output table column having a first and second data types, wherein the first and second data types are different;
means for determining whether the first and second data types in the output table column are in a promotion path, such that the first data type is capable of being promoted to the second data type; and
means for promoting the data in the output table column having the first data type to the second data type if the first data type is capable of being promoted to the second data type.
-
-
14. The system of claim 9, wherein copying the data from one column in the input table to one row in the output table comprises means for copying the data from the column in the input table into a row starting from a column in the output table following a first column.
-
15. A system for transforming an input table comprised of multiple columns and rows, comprising:
-
means for determining whether a sequential number column is provided;
means for copying data from column in the input table into output table row starting from a column following a first two columns if the sequential number column is provided;
means for copying the data from the column in the input table into the output table row starting from the column following the first column if the sequential number column is not provided; and
means for inserting sequential numbers into one of the first two columns in the output table to sequentially number the rows of the output table if the sequential number column is provided.
-
-
16. An article of manufacture for use in transforming an input table in a database comprised of multiple columns and rows, the article of manufacture comprising computer usable media including at least one computer program embedded therein that causes the computer to perform:
-
copying, for each column, data from one column in the input table into one row in an output table to invert the input table;
determining whether a sequential number column is provided, wherein the data from the column in the input table is copied into the output table row starting from a column following the sequential number column in the output table if the sequential number column is provided; and
inserting sequential numbers into the sequential number column in the output table to sequentially number the rows of the output table if the sequential number column is provided. - View Dependent Claims (17, 18, 19, 20, 21)
determining whether the data in the input table columns inverted into the rows in the output table form at least one output table column having a first and second data types, wherein the first and second data types are different;
determining whether the first and second data types in the output table column are in a promotion path, such that the first data type is capable of being promoted to the second data type; and
promoting the data in the output table column having the first data type to the second data type if the first data type is capable of being promoted to the second data type.
-
-
21. The article of manufacture of claim 16, wherein copying the data from one column in the input table to one row in the output table, comprises copying the data from the column in the input table into a row starting from a column in the output table following a first column.
-
22. An article of manufacture for use in transforming an input table in a database comprised of multiple columns and rows, the article of manufacture comprising computer usable media including at least one computer program embedded therein that causes the computer to perform:
-
determining whether a sequential number column is provided;
copying data from column in the input table into output table row starting from a column following a first two columns if the sequential number column is provided;
copying the data from the column in the input table into the output table row starting from the column following the first column if the sequential number column is not provided; and
inserting sequential numbers into one of the first two columns in the output table to sequentially number the rows of the output table if the sequential number column is provided.
-
Specification