About 2,730,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. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · 2060 The CASE statement is the closest to IF in SQL and is supported on all versions of SQL Server.

  3. 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 …

  4. SQL - Select first 10 rows only? - Stack Overflow

    Dec 12, 2009 · How do I select only the first 10 results of a query? I would like to display only the first 10 results from the following query: SELECT a.names, COUNT(b.post_title) AS num FROM

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

    I'm trying to run the following fairly simple query in SQL Server Management Studio: SELECT TOP 1000 * FROM master.sys.procedures as procs left join master.sys.parameters as params on p...

  6. Search text in stored procedure in SQL Server - Stack Overflow

    Feb 5, 2013 · I want to search a text from all my database stored procedures. I use the below SQL: SELECT DISTINCT o.name AS Object_Name, o.type_desc FROM sys.sql_modules m INNER JOIN ...

  7. Remove all spaces from a string in SQL Server - Stack Overflow

    May 3, 2012 · What is the best way to remove all spaces from a string in SQL Server 2008? LTRIM(RTRIM(' a b ')) would remove all spaces at the right and left of the string, but I also need to …

  8. Convert Month Number to Month Name Function in SQL

    Oct 9, 2008 · SQL Server nowadays can get the ordinalnummer of a comma separated value of values, using the STRING_SPLIT function Also the names of the month are already stored in SQL Server …

  9. 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

  10. How to select unique records by SQL - Stack Overflow

    How to select unique records by SQL Asked 16 years ago Modified 1 year, 10 months ago Viewed 746k times