About 24,200,000 results
Open links in new tab
  1. How to run a SQL query on an Excel table? - Stack Overflow

    For what I'm trying to do, the SQL query SELECT lastname, firstname, phonenumber WHERE phonenumber IS NOT NULL ORDER BY lastname would do the trick. It seems too simple for …

  2. using "USE" keyword Vs. full table name in T-SQL

    Feb 18, 2014 · I'd tend to use [server].[database].[schema].[table] in instances where a script may query mutliple tables from multiple databases. The USE [database] would typically be used in …

  3. How to declare variable and use it in the same Oracle SQL script ...

    The question is about to use a variable in a script means to me it will be used in SQL*Plus. The problem is you missed the quotes and Oracle can not parse the value to number.

  4. sql - Can I use multiple "with"? - Stack Overflow

    Nov 24, 2015 · These are CTEs - Common Table Expressions. They are more like... named queries that you can use as if they were tables... or rather more like views. Please google …

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

    Sep 15, 2008 · I prefer the conciseness when compared with the expanded CASE version. Both IIF() and CASE resolve as expressions within a SQL statement and can only be used in well …

  6. sql server - sql use statement with variable - Stack Overflow

    Within SQL, you've only got the sp_sqlexec approach; the other option is to construct the SQL sequence of USE/SELECT externally. You'll still need to construct the SQL by hand but, on …

  7. How to use SQL LIKE condition with multiple values in PostgreSQL?

    Is there any shorter way to look for multiple matches: SELECT * from table WHERE column LIKE "AAA%" OR column LIKE "BBB%" OR column LIKE "CCC%" This questions applies to …

  8. sql - Case in Select Statement - Stack Overflow

    Jan 7, 2013 · I have an SQL statement that has a CASE from SELECT and I just can't get it right. Can you guys show me an example of CASE where the cases are the conditions and the …

  9. sql - When to use a View instead of a Table? - Stack Overflow

    By having all reports use this view, everyone is working from the same data set, rather than one report using one set of joins and another forgetting to use one which gives different results. …

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

    I have seen SQL that uses both != and <> for not equal. What is the preferred syntax and why? I like !=, because <> reminds me of Visual Basic.