About 3,280,000 results
Open links in new tab
  1. Simple way to transpose columns and rows in SQL?

    How do I simply switch columns with rows in SQL? Is there any simple command to transpose? ie turn this result: Paul | John | Tim | Eric Red 1 5 1 3 Green 8 ...

  2. Should I use != or <> for not equal in T-SQL? - Stack Overflow

    Yes; Microsoft themselves recommend using <> over != specifically for ANSI compliance, e.g. in Microsoft Press training kit for 70-461 exam, "Querying Microsoft SQL Server", they say "As …

  3. sql - Must declare the scalar variable - Stack Overflow

    @RowFrom int @RowTo int are both Global Input Params for the Stored Procedure, and since I am compiling the SQL query inside the Stored Procedure with T-SQL then using …

  4. How can I do an UPDATE statement with JOIN in SQL Server?

    This was an example, but the point is as Eric said in How can I do an UPDATE statement with JOIN in SQL Server?. You need to add an UPDATE statement at first with the full address of …

  5. sql - Update a table with data from another table - Stack Overflow

    Muhd 25.8k 22 66 79 2 possible duplicate of sql update query with data from another table – p.campbell Aug 11, 2011 at 18:07 2

  6. SQL "IF", "BEGIN", "END", "END IF"? - Stack Overflow

    Not a SQL person at all. Have the following code a consultant wrote. First, it makes sure only an elementary school has been chosen - then, after the BEGIN, if the variable @Term equals a 3 …

  7. Get everything after and before certain character in SQL Server

    Jun 13, 2012 · I got the following entry in my database: images/test.jpg I want to trim the entry so I get: test So basically, I want everything after / and before . How can I solve it?

  8. sql - A table name as a variable - Stack Overflow

    The best practice when assembling object names into dynamic SQL statements is to use QuoteName() to avoid problems with odd names, e.g. New Table with a space or reserved …

  9. SQL WHERE.. IN clause multiple columns - Stack Overflow

    I need to implement the following query in SQL Server: SELECT * FROM table1 WHERE (CM_PLAN_ID, Individual_ID) IN ( SELECT CM_PLAN_ID, Individual_ID FROM …

  10. How to see query history in SQL Server Management Studio

    Is the query history stored in some log files? If yes, can you tell me how to find their location? If not, can you give me any advice on how to see it?