About 410,000 results
Open links in new tab
  1. sql - Efficiently convert rows to columns - Stack Overflow

    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. This is my example: Id Value ColumnName 1 John

  2. sql server - How to convert Rows to Columns - Database …

    Nov 21, 2016 · first of all - You must fix main query - select UserId ,FromDate, ToDate, Project, Comment from ( select R.UserId ,R.Text , C.ColumnName from [Columns] C INNER JOIN Response …

  3. How to convert rows values into different columns based on the values ...

    How to convert rows values into different columns based on the values in a Column in SQL Server 2012 Ask Question Asked 8 years, 5 months ago Modified 8 years, 5 months ago

  4. SQL select only rows with max value on a column [duplicate]

    SELECT id, MAX(rev) FROM YourTable GROUP BY id It's never that simple, is it? I just noticed you need the content column as well. This is a very common question in SQL: find the whole data for the …

  5. SQL Server : Columns to Rows - Stack Overflow

    Then I CROSS APPLY a function to each XML attribute of this column, so that I get one row per attribute. Overall, this converts columns into rows, without knowing the column names and without …

  6. Access the "previous row" value in a SELECT statement

    SELECT value - (previous.value) FROM table Imagining that the "previous" variable reference the latest selected row. Of course with a select like that I will end up with n-1 rows selected in a table with n …

  7. sql - Database - (rows or records, columns or fields ... - Stack Overflow

    Feb 4, 2012 · Row and record can arguably be considered as the same thing. Fields and columns are different, a field is the intersection of a row and a column. i.e. if your table has 10 rows and 10 …

  8. sql - How do I use ROW_NUMBER ()? - Stack Overflow

    Jun 7, 2009 · SQL Row_Number () function is to sort and assign an order number to data rows in related record set. So it is used to number rows, for example to identify the top 10 rows which have the …

  9. sql - Concatenate text from multiple rows into a single text string ...

    Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary?

  10. Convert Rows to columns using 'Pivot' in SQL Server

    Apr 10, 2013 · Pivot is one of the SQL operator which is used to turn the unique data from one column into multiple column in the output. This is also mean by transforming the rows into columns (rotating …