How To Convert Rows Into Columns In Sql Query

Oracle/PLSQL String Functions: ASCII: Get The ASCII Value Of A Character: (, q used to define a quote delimiter for PL/SQL:. Convert row data to column in SQL ServerToday I was asked by my colleague to transform data from a vertical staging table into a horizontal table. Unfortunately in this case because of the size of the table, the log growth on adding an identity column was too much. if the column is varchar(20) and the values inside are numbers, they may appear as "25" for us a developer, but will. Switching data from columns to rows or from rows to columns is known as transposing the data. These tasks will perform the batch update/delete using the data we loaded into the staging tables. This can be used to load content into a table. This article will help developers looking for a way to split delimited strings in a single query using XML. For this we will be using Microsoft. The column-name join is like a natural join, but it’s more flexible. if the column is varchar(20) and the values inside are numbers, they may appear as "25" for us a developer, but will. A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. But what would happen when someone ask to pivot table without using pivot function in sql. NAME IN (SELECT NAME FROM B) THEN A. Converting rows into Columns. Following from the above example, use the TO_LOB function to convert the LONG column to a CLOB:. However, when the data is simple and limited I avoid using it (too lazy to click through 6 screens… :) ) instead I generate INSERT statements using CONCATENATE function in Excel and execute those. Continue doing filtering, joining, and column selection as for any other SQL query. Previously, I created a script on ScriptCenter that used an alternative technique to import large CSV files, and even imported them into SQL Server at a rate of 1. The delimiter can only be a single character. NAME END AS ID_NAME FROM A. Now, every time I need to create a dynamic query, I need to know what is the final query I am going to arrive to. If you have a worksheet with data in columns that you need to rotate to rearrange it in rows, use the Transpose feature. Aliases are often used to make column names more readable. but the rows are fed into the rest of the query as soon as they are produced. DevX is the leading provider of technical information, tools, and services for professionals developing corporate applications. by Mulish Mehdi (3 replies) how to update multiple entries by khari6579 (1 replies) problem with select within select by khari6579. Datatypes In SQLite. In this solution, we will use a new function shipped with SQL Server 2012 namely Format. How to convert a column into comma-separated string in HANA DB I need do this in order to use it inside an. As an SQL database programmer and developer you have often asked yourself, “Can I insert multiple rows into a single table through a single SQL statement?” One way to insert any value into a table is to write multiple insert statements. Pivot Query: Crosstab Query: The SQL Snippets "Rows to Columns" tutorial has been updated to include. net ,C#,And sql serverplz help me i want solutions for thi query. That will update all rows in table A such that what was in Column2 for each record now is in Column1 for that record as well. 2) MySQL INSERT – Inserting rows using default value example. Here are the performance results of the query with encrypted columns and no indexes. You can supply the values for the SET clause from a SELECT statement that queries data from other tables. Convert rows into Column in SQL Server. HI All, I have to build a query which converts multiple lines in table column into a single line value. If the query could return up to 20 rows, 19 joins need to be written into the query to put all of the results in a single row. my input Data ONAY_ID sip_RECno KULLANICI ONAY 1. Pivot was first introduced in Apache Spark 1. So basically, you need to split the list into its separate values, then insert each one of those values into a new row. This is not only boring and tedious but also time consuming. In SQL Server you can use the efficiently-convert-rows-to. Click Insert > Module, and paste the following code in the Module window. Therefore there’s no need for you to insert a value into that column. They allow you to pass a parameter to the query and return results based on the parameter passed. ) and do the Drill Down then. 12/30/2015 etc Databricks imported this column with type str, instead of date. Database administrators and ordinary users can use the query function to get real-time information from the database; queries can even display the data in an alternative format. With unpivot you need the column which states the source of the values, what these sources are and the list of columns you want to convert to rows. Usually, we PIVOT a table using. So for example, to order the results according to increasing expenditure (column F), we can write: “Select C,D, F,H where D < 40 order by F asc". A group that. A list of Column objects for in the order of the fields from the last SELECT or None if the last SQL operation was not a SELECT. The following query will do it. I have had a look at the following example which works for consecutive rows above a threshold. (However, in practice, some SQL tools will retrieve rows using a comparison with Null. If you’ve ever tried to use PowerShell’s Import-CSV with large files, you know that it can exhaust all of your RAM. How to convert column data into rows, grouped by identifier. Understand the differences between JSON data and relational data. If not, it inserts the string. For this purpose, you need to pivot (rows to columns) and unpivot (columns to rows) your data. That's why the LEFT JOIN / IS NULL query takes 810 ms, or 3 times as much as the NOT EXISTS / NOT IN query. The Excel-to SQL INSERT Commands Text Wizard! This tool will take specifically formatted data that is copy and pasted from Excel (and possibly other spreadsheet programs) and convert them into SQL INSERT commands. Personally, I'd love it if there was a way to allow with clauses to overwrite tables inside views (like SQLite does)—that opens the door to generic views, i. alter database alter table alter view analyze table backup table cache index change master to check table checksum table commit create database create index create table create view delete describe do drop database drop index drop table drop user drop view explain flush grant handler insert join kill load data from master load data infile load index into cache. However, a data source might have a first row that contains column names. Sometimes data is entered in columns but what you really want is to rearrange that data into rows instead. Otherwise, it will be ID+Name. Users should convert to CLOB or NCLOB types. How can I convert this SQL statement into Power Query? Thank you for. Remove Leading Zeros in a Varchar Column but keep inside spaces (with SQL Server 2017 solution) Posted: October 8, 2019 | Author: Jingyang Li | Filed under: Uncategorized | Leave a comment. Q: How can I convert values of a column in an Excel table into text objects of a text dataset? A: Import an Excel table into iDesktop to get a tabular dataset, convert it into a point dataset, and then convert a field in the point dataset into text objects of a text dataset with the Field to Text conversion method. Note that the SQL needs to end with semi-colon if you have multiple queries in the query window. SQL> SQL> CREATE TABLE product. 2 Comments. We will use recursive query to convert multiple rows into one single row where each row value will be separated by a delimiter ( in this case, it is ~). This T-SQL script will demo how to combine multiple rows into one row by a same column value in SQL Server. I have one problem with macro. You can use the attached example code to import-export data between Microsoft Excel and SQL Server. The OPENJSON rowset function converts JSON text into a set of rows and columns. bulk_insert; ORA-01400: cannot insert NULL into PL/SQL procedure successfully completed. Sql query to convert rows to columns. The same query works fine in bteq. there are four columns display time in/out. The following query shows NVL2 in action. The CASE expression is exercised on each row returned. The ALTER TABLE statement is also used to add and drop various constraints on an existing table. Tried pivot but did not work as the data was not consistent with rundate may or maynot have ertread for some premise. Working with jQuery DataTables. SQL> set serverout on SQL> exec bulk_ins. Example SQL> CREATE TABLE t1(id NUMBER, doc LONG); Table created. Back in the Control Flow, add two Execute SQL tasks. The Table encapsulates the data in the table, and implements the IQueryable interface, so that the expression tree is created, which the LINQ to SQL provider handles. This post is a follow-up of a post where I showed how to transpose rows into columns. I followed some of the advice in some of the other comments, and I spent a day and rewrote my entire project to use Postgres instead. You will use these tools to specify what data you want returned, either by pointing and clicking, or by pasting an SQL statement into the SQL window. We need to load the data from Flat File Source but want to insert the values in ID column from the source instead of SSIS create identity values for ID column. In order to create a XML string you must append the FOR XML command after any regular query. The SQL to convert a table (in this case wp_posts) is as follows: ALTER TABLE wp_posts CHARACTER SET utf8; Like the conversion of the parent database, altering a table does not automatically convert the character set of the columns contained in the table. I want the M (Power Query) function below to return a list of unique values from a given column in a table. APPLIES TO: SQL Server Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse. A function expression uses a function that is evaluated for each row in the query. An index can help to improve the SQL query performance if the criteria of the query matches the columns that are left most in the index key. As soon as CTP3 will release we will see how can we read data back from from JSON string and convert it to tabular (row/column) format. Brief History and Purpose Of SQL. Select the row where you want begin importing data. How do you successfully transpose rows into columns in Excel? How to transpose rows into columns in Access; store procedure to transpose rows to columns; Transpose of column data into rows in a table in jsp; Transpose Rows to Column Headings; Query to transpose rows to columns via Primary Key; how to count rows and columns of integers/doubles. It has got only one column b. txt file format with output fields in particular column positions. Often I find myself with data in an external database, such as Access and continuously editing the query there to get the data how I want it in Excel. Converts a value to text according to the specified format. Select the state and display the number of people in each. The crosstab wizard generates 4 columns of URL information, because each of the abbreviated 4 URL's are variables that has a common element being User1 or User2 buried within it. It seems that sparksql does not allow 'update' or 'set' statements so I cannot do this with sql. Here is the code to query all table columns in a database for particular text. Okay, this was a rough one. Likewise for Sql Server, use CAST({f} AS DATETIME). Also I noticed that BulkCopy is case sensitive when it comes to match the columns. SQL> SELECT id, NVL2(col1, col2, col3) AS output FROM null_test_tab ORDER BY id; ID OUTPUT ----- ----- 1 TWO 2 THREE 3 THREE 4 THREE 4 rows selected. But that creates an INT column. Converting a single comma separated row into multiple rows November 12, 2015 Reply […] since I wrote Converting multiple rows into a single comma separated row, I was trying to find a SQL command which will do the reverse, which is converting the single comma […]. Computer Company. Points: 119. Advanced Editor - Open the advanced editor to edit the M code for the query. Select From Other Source > Blank Query; In the Query Editor formula bar type the following expression: = {2002. 7 million rows a minute. First we will create a simple function to parse, bind and execute a simple EMP query, convert the cursor to a ref cursor and return it to the calling program. I need a query in sq l server which converts rows. Personally, I'd love it if there was a way to allow with clauses to overwrite tables inside views (like SQLite does)—that opens the door to generic views, i. Unlike the basic Spark RDD API, the interfaces provided by Spark SQL provide Spark with more information about the structure of both the data and the computation being performed. But what happens when there can be a large number of rows that need to be compressed to a single row? The query has to be written to join each item. Usually, we PIVOT a table using. The delimiter can only be a single character. 2) you convert columns on a single row into multiple rows with a generic column and a rowtype discriminator. It was not too bad. I’d seen the minimize column count scripture before, but never took it to heart. Copy your column of text in Excel; Paste the column here (into the leftmost textbox) Copy your comma separated list from the rightmost textbox; Paste your comma separated list wherever you wish. @Query(value = "Select empid,empname from employee group by empid", nativeQuery = true) List findempfidempname();. Note that in this case it is “legal” to have multiple records and fields coming from a sub query. You can also select the e. SQL Server allows you to perform the following changes to an existing column of a table:. I checked up a few blogs and I found out that it was possible to do with the help of custom functions or stored procedures, but I. I'm not sure what you're getting at here. ) and do the Drill Down then. Converting Rows to Columns – PIVOT. A group that. SQL Server Indexes Overview A SQL Server index is considered as one of the most important performance-tuning factors. You can insert data into XMLType columns in the following ways: By using the INSERT statement (in SQL, PL/SQL, and Java) By using SQL*Loader. We have already created a new table and inserted data into that table. If you ever find yourself needing to work with multiple rows of data, maybe in a sub-query, LISTAGG and XMLAGG are great functions for the job. Therefore there’s no need for you to insert a value into that column. The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. Convert rows into Column in SQL Server. Since there are so many different database vendors, the Structured Query Language (SQL) was standardized so we could communicate in a portable manner to database systems from multiple vendors. As far as I remember, Sybase didn't support crosstab-based reports when I worked on it in 2004/5. With the following VBA code, you can also join the multiple columns and rows into a single column. title, director and year, but nothing in those columns. Sometimes data is entered in columns but what you really want is to rearrange that data into rows instead. I'm using an API to pull data into power query - for the most part, this creates distinct columns for each value. However, make sure the order of the values is in the same order as the columns in the table. Tagged: Bhavesh Patel, SQL, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology, Variable for Column name, Variable instead Column name. You can use the attached example code to import-export data between Microsoft Excel and SQL Server. my input Data ONAY_ID sip_RECno KULLANICI ONAY 1. FOR XML PATH Clause. In a natural join, all the. USE tempdb GO ALTER TABLE dbo. I have another table b. Given below is the script. If a grouping column contains a null, that row becomes a group in the result. and aggregate them into a crosstab matrix like this. I am developing a JSP page with struts tags. Current version supports some database specific output and support ORACLE, MYSQL, SQL SERVER, PostreSQL and ANSI SQL databases. To add this column you would have to open up the query editor click on the Add Column ribbon and then click the Date button. Concatenate query results in SQL Server using Coalesce. Beginner Oracle SQL developers will learn how to: Use the JSON_TABLE function. Any query that runs into several seconds is clearly accessing thousands of rows. The column store technology of MonetDB has found its way into the product offerings of all major commercial database vendors. ) Locate the Column Headings property. Therefore there’s no need for you to insert a value into that column. SQL> SELECT id, NVL2(col1, col2, col3) AS output FROM null_test_tab ORDER BY id; ID OUTPUT ----- ----- 1 TWO 2 THREE 3 THREE 4 THREE 4 rows selected. Daily_Timetable has data which has week_day,class_id. There are two methods to reformat the date and time into the desired format. The second form uses a LIKE clause to create a table that has the same column names and column attributes as another table. How to Convert a Row to a Column in Excel the Easy Way Lori Kaufman @howtogeek Updated September 28, 2017, 5:33pm EDT You've set up a worksheet, when you realize it would look better if the rows and columns were reversed. To cofirm both tables have identical data, Row count returned in below query should be same as number of rows in emp1 or emp2(row count of below query= row count of emp1= row count of emp2). The Unknown result causes the SELECT statement to summarily discard each and every row. The NUMBER(*) function is useful for generating primary keys with Syntax 2 of the INSERT statement. [cc lang="sql"] SELECT TOP 100 EmployeeID, EmployeeXML = (SELECT. For example, if your data looks like this, with Sales Regions in the column headings and and Quarters along the left side:. Microsoft Access / VBA Forums on Bytes. If you ever need to revert a crosstab query back to a select query, here's how. Transposing rows to columns is very useful when presenting the information. Given below is the script. Here are the performance results of the query with encrypted columns and no indexes. " Conclusion. SQL convert from 3 to 2 columns. Transposing columns into rows in access. Converting rows into Columns. The ALTER TABLE statement is also used to add and drop various constraints on an existing table. I checked up a few blogs and I found out that it was possible to do with the help of custom functions or stored procedures, but I. This neat and simple little trick will help to transform each row in a table or query into an XML row. " Here are the steps in detail that I was not able to supply in the forum reply. The PIVOT operator takes data in separate rows, aggregates it and converts it into columns. Consider this data table. Along with 16+ years of hands on experience he holds a Masters of Science degree and a number of database certifications. Dynamic pivot tables (transform rows to columns) MySQL pivot table with dynamic headers. e alter collation all tables columns as SQL_Latin1_General_CP1_CI_AS with the below-written query. Sql query to convert values under a row to a column. You can use a SELECT statement when inserting into a table. Home » Articles » Misc » Here. 1) you convert multiple rows into a single row with repeating groups of columns. To_char function with alias column name : alias column « Select Query « Oracle PL / SQL To_char function with alias column name. Data is inserted one record (row) at a. Then, you will learn about the advanced queries such as joining multiple tables, using set operations, and constructing the subquery. Conclusion. Chrissy is certified in SQL Server, Linux, SharePoint and network security. SSC Enthusiast. The conversion from SQL to NoSQL databases requires combining small, normalised SQL data tables into larger NoSQL data tables; a process called denormalisation. See Section 12. Append Query Option when Designing Queries in MS Access 2013 and 2016. SQL> select '01-JUN-01' - 'abc' from dual; ERROR: ORA-01722: invalid number no rows selected How to fix it. How to show the content of a table in SQL server database to C# a gridview; DECLARE and SELECT multiple variables in SQL Server; Updating SQL Server table; Get number of Rows populated in SQL Server from within Vb. Conclusion. 1) you convert multiple rows into a single row with repeating groups of columns. To do this, we need to use PIVOT clause like below. text field you can put it in any column: ID. Therefore there’s no need for you to insert a value into that column. The operators pair the columns returned by each input query according to the columns' positions in their respective SELECT lists. SQLite uses a more general dynamic type system. This class can be used to convert data from MySQL query results into a JavaScript expression in JavaScript Object Notation. Convert rows into Column in SQL Server. If you have a worksheet with data in columns that you need to rotate to rearrange it in rows, use the Transpose feature. The CONVERT function is used to format the percentage figures in percentage format. As soon as CTP3 will release we will see how can we read data back from from JSON string and convert it to tabular (row/column) format. Line 2 is a tab separated list of field names. Identifying Columns for the Sum Function. METHOD 1 : USING T-SQL In this method, we need to first drop the computed column and then add it as a new column to accommodate the altered computed column in any table. # Method 3 -> Using PIVOT Operator The PIVOT and the UNPIVOT operators were introduced in Oracle version 11g. cast functions to convert data type or db2 functions to convert data types. of your queries before putting the code into your the years to optimize Microsoft SQL Server and to make it -close to. The Apache Spark 2. Here we will show you some tricky things about how to change a single column into multiple columns. column reference. SELECT * FROM [dbo]. This site shows an example of using the Oracle LAG function to display multiple rows on a single column: Matt contributed this handy SQL techniques to pivot one row of several columns into a single column with several row, using the Oracle cross join syntax. Spark SQL is a Spark module for structured data processing. I'm not sure what you're getting at here. How do you successfully transpose rows into columns in Excel? How to transpose rows into columns in Access; store procedure to transpose rows to columns; Transpose of column data into rows in a table in jsp; Transpose Rows to Column Headings; Query to transpose rows to columns via Primary Key; how to count rows and columns of integers/doubles. In this little demo file, although your source table has Boolean (Yes/No) columns the example for Quantity in Stock values would in fact be the appropriate one in your case as you wish to store the Boolean values in the third column, Selected, in your final table rather than having a two-column table in which each row repesents a selection. We may not get data always in this format so here is the PHP code to convert to this format before using inside a query. (If you don't see it, you are looking at the properties of a field instead of the properties of the query. And guess what, in Postgres the UTF-8 stuff works out of the box. Working with jQuery DataTables. This article gives an overview of the functionality available for aggregation in data warehouses, focusing specifically on the information required for the Oracle Database SQL Expert (1Z0-047) exam. The fix depends upon the exact expression which caused the problem. the value comes in 20100725 and i want this in the format of date like 7/25/2010 12:00:00 AM can anybody please help?. But, when it comes to separating the. An Append query is often referred to as an Insert Query because the SQL syntax uses the INSERT INTO command. ) Cursor The default cursor class. If both the column list and the VALUES list are empty, INSERT creates a row with each column set to its default value: INSERT INTO tbl_name VALUES(); If strict mode is not enabled, MySQL uses the implicit default value for any column that has no explicitly defined default. The CONVERT function is used to format the percentage figures in percentage format. Translate key-value pairs into tabular rows and columns. sql server - How to transpose rows into columns in SQL How to Convert Rows to Columns. Convert row data to column in SQL ServerToday I was asked by my colleague to transform data from a vertical staging table into a horizontal table. txt file format with output fields in particular column positions. SQL> CREATE TABLE t 2 ( x INT PRIMARY KEY 3 , y NUMBER(10,2) 4 , z VARCHAR2(80) 5 ); Table created. Dear Excel friends, let me ask you a question about how i could convert multiple (10000)columns into one column, if possible without VBA(and mechanical work, because to much data). Check Column names in the first data row. The SSMS status bar displays the actual row count. Just copy and paste the SQL query for the table creation and data insertion, and then add the missing months if necessary. The example of string to int by SQL CAST. In the below example I have highlighted the line where you can enter your search text in green. I imported a csv file as a Table into databricks. Make sure you always have the Column Name in same case as you have in SQL Server Table. But the thing is, you need to insert each value in the list into its own table row. PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output and performs aggregations where they are required on any remaining column values that are wanted in the final output. Convert rows to column in SQL server. Column A column expression in a DataFrame. If you have a different. As far as I remember, Sybase didn't support crosstab-based reports when I worked on it in 2004/5. Use this tool to convert a column into a Comma Separated List. The field value will be substituted for {f}. Conclusion. Using DECODE() and GROUPING() to Convert Multiple Column Values. Joshua Berry Software Engineer Opentech, S. In Sql, Pivoting can convert rows to columns. This scenario can be achieved by CTE (Common Table Expressions) and MAX case combination. how to convert multiple rows into (separte) columns in one row? - Learn more on the SQLServerCentral forums. Here I am suggesting a solution using Microsoft Excel's Power Query feature. # Method 3 -> Using PIVOT Operator The PIVOT and the UNPIVOT operators were introduced in Oracle version 11g. The SQLDA holds information about dynamic SQL queries, and is required for allocating the proper amount of space for the query. Here is the example SQL statement: SELECT CASE WHEN A. Why do you want to use collections and why do you think they'll improve performance?. In other words, the spreadsheet looked like this: But we needed the records to list Program values by date, like this: Of course, I did that by simply copying the cells. I'm looking for an efficient way to convert rows to columns in SQL server, I heard that PIVOT is not very fast, and I need to deal with lot of records. Given is below. Note the use of convert here. Select the number of columns you want to include in the import. A business analyst recently asked me three questions. I was hoping to generate a column of URL information for User1 and a column of URL information for User2 which would be the specified column headings. You can use any delimiter in the given below solution. I believe the other method was getting you the data in a comma-delimited string whereas you want to insert this into a table (although, are you sure your columns will include code and name). So for example, to order the results according to increasing expenditure (column F), we can write: “Select C,D, F,H where D < 40 order by F asc". Color-----red orange. Similarly, AA345 means, Column AA and Row 345. I’m in the situation where I want to get data from a very large SQL Table (over 5 million rows) AND also from a large SharePoint List (over 100,00 rows and 120 columns). Personally, I'd love it if there was a way to allow with clauses to overwrite tables inside views (like SQLite does)—that opens the door to generic views, i. (29 row(s) affected) Table 'Employees'. Convert to newer CLOB/NCLOB type. The code works fine with Microsoft SQL Server 2005-2016 and Microsoft Azure SQL Database, and in Microsoft Excel 2003-2016. SQL ALTER TABLE Statement. This post is a follow-up of a post where I showed how to transpose rows into columns. This way you will be able to transform the 12 months of the year from columns to rows in one single SQL Server query. Teradata Timestamp tips & tricks the current_timestamp value into this column using. Now i want to insert the 4 columns from table a into 4 rows of table b. For addresses, you might want to split one column into four columns: street, city, state and ZIP code. And to have results in a. How to convert column list to comma separated list in Excel? If you want to convert a column list of data to a list separated by comma or other separators, and output the result into a cell as shown as below, you can get it done by CONCATENATE function or running a VBA in Excel. How to format DateTime column in SQL Server? SQL Server 2008 onwards you can use the following query For Date only: SELECT CONVERT(DATE,GETDATE()) AS 'DateOnly'. Converting Rows to Columns - PIVOT. The basic unit of a PL/SQL source program is the block, which groups together related declarations and statements. Sql query to convert values under a row to a column. For example, we are considering a table named Ashish. need sql query to convert a column of a table into meaningful data – Learn more on the SQLServerCentral forums The bit that Gianluca and I are most interested in at this point is a sample. This subquery selects each row in the some_numbers column and uses UNNEST to return the array as a set of rows. A function expression uses a function that is evaluated for each row in the query. In case the default value is not set for the column, the column will take the NULL value. This can be used to load content into a table. NET Forums / Data Access / SQL Server, SQL Server Express, and SQL Compact Edition / How to split a comma-separated value to columns in sql server How to split a comma-separated value to columns in sql server RSS. Hi All, I need a logic for to convert columns into rows. But now with the CTP 3 release you can do reverse of it also, means now you can read back JSON data and convert it to tabular or row & column format. So we thought of proposing a single solution to both the problems. The following query will give the same result as the query above, just by using the PIVOT operator. The result set contains a single column. Using SQL Server PIVOT, we can efficiently rotate a table’s data to show a summarized result. So if i encounter a value of "3" in the the second column in 3 rows in the table. Power Query Magic: The Ultimate and easiest way to consolidate multiple tables, sheets, text and/or csv files (Click for Full-Size Version) At some point in the life of an Excel user, we have all faced a similar dillemma. At now point does the entire set of products get fetched to the web-server. alter database alter table alter view analyze table backup table cache index change master to check table checksum table commit create database create index create table create view delete describe do drop database drop index drop table drop user drop view explain flush grant handler insert join kill load data from master load data infile load index into cache. NET Forums / Data Access / SQL Server, SQL Server Express, and SQL Compact Edition / Converting Column values to Rows in SQL Query Converting Column values to Rows in SQL Query [Answered] RSS 7 replies. The solutions vary, depending on the release of SQL Server you're using. When I do compare operations (routing decision, etc), I have to calculate the decimal value and use that instead of the binary equivalent. Example SQL> CREATE TABLE t1(id NUMBER, doc LONG); Table created.