About 2,560,000 results
Open links in new tab
  1. SQL: IF clause within WHERE clause - Stack Overflow

    Sep 18, 2008 · Is it possible to use an IF clause within a WHERE clause in MS SQL? Example: WHERE IF IsNumeric(@OrderNumber) = 1 OrderNumber = @OrderNumber ELSE OrderNumber LIKE '%' + @

  2. SQL JOIN: what is the difference between WHERE clause and ON clause?

    SQL INNER JOIN The SQL JOIN clause allows you to associate rows that belong to different tables. For instance, a CROSS JOIN will create a Cartesian Product containing all possible combinations of …

  3. sql - Incorrect syntax near '' - Stack Overflow

    SELECT TOP 1000 * FROM master.sys.procedures as procs left join master.sys.parameters as params on procs.object_id = params.object_id This seems totally correct, but I keep getting the following …

  4. Combining "LIKE" and "IN" for SQL Server - Stack Overflow

    Is it possible to combine LIKE and IN in a SQL Server-Query? So, that this query

  5. How to calculate percentage with a SQL statement

    Due to precedence of SQL statements it will be the same. however, due to data types if using 100 you can still get the result rounded to 0 decimals you desire for the % where as if you put it after the …

  6. SQL SELECT WHERE field contains words - Stack Overflow

    Jan 12, 2013 · SQL SELECT WHERE field contains words Asked 12 years, 10 months ago Modified 7 months ago Viewed 4.9m times

  7. sql server - SQL MAX of multiple columns? - Stack Overflow

    Mar 8, 2012 · How do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date2, Date3, Cost] I need to return something like this: [Number, Most_Recent_Date, Cost] …

  8. sql server - Database stuck in "Restoring" state - Stack Overflow

    Ran into a similar issue while restoring the database using SQL server management studio and it got stuck into restoring mode. After several hours of issue tracking, the following query worked for me.

  9. SQL to find the number of distinct values in a column

    Apr 5, 2019 · SQL to find the number of distinct values in a column Asked 17 years, 2 months ago Modified 2 years, 7 months ago Viewed 825k times

  10. Inserting multiple rows in a single SQL query? - Stack Overflow

    Jan 17, 2009 · In SQL Server 2008 you can insert multiple rows using a single INSERT statement.