About 2,650,000 results
Open links in new tab
  1. 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 …

  2. SQL WITH clause example - Stack Overflow

    Sep 23, 2012 · 353 The SQL WITH clause was introduced by Oracle in the Oracle 9i release 2 database. The SQL WITH clause allows you to give a sub-query block a name (a process also …

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

  4. How do I perform an IF...THEN in an SQL SELECT?

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

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

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

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

  7. sql - Selecting COUNT (*) with DISTINCT - Stack Overflow

    In SQL Server 2005 I have a table cm_production that lists all the code that's been put into production. The table has a ticket_number, program_type, program_name and push_number …

  8. Get the last day of the month in SQL - Stack Overflow

    105 From SQL Server 2012 you can use the EOMONTH function. Returns the last day of the month that contains the specified date, with an optional offset. Syntax

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

  10. How to set variable from a SQL query? - Stack Overflow

    I'm trying to set a variable from a SQL query: declare @ModelID uniqueidentifer Select @ModelID = select modelid from models where areaid = 'South Coast' Obviously I'm not doing this right …