About 50 results
Open links in new tab
  1. How do I perform an IF...THEN in an SQL SELECT?

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

  2. SQL: Two select statements in one query - Stack Overflow

    Aug 13, 2015 · I want to select information from two SQL tables within one query, the information is unrelated though, so no potential joints exist. An example could be the following setup. tblMadrid id | n...

  3. Access the "previous row" value in a SELECT statement

    Imagining that the "previous" variable reference the latest selected row. Of course with a select like that I will end up with n-1 rows selected in a table with n rows, that's not a probably, actually is exactly …

  4. Replacing NULL and empty string within Select statement

    Replacing NULL and empty string within Select statement Asked 12 years, 10 months ago Modified 6 years, 6 months ago Viewed 152k times

  5. sql - SELECT from nothing? - Stack Overflow

    Sep 17, 2010 · Is it possible to have a statement like SELECT "Hello world" WHERE 1 = 1 in SQL? The main thing I want to know, is can I SELECT from nothing, ie not have a FROM clause.

  6. How to get table name within a 'select' statement in SQL Server

    Jun 20, 2013 · How to get table name within a 'select' statement in SQL Server Asked 12 years, 10 months ago Modified 10 years, 9 months ago Viewed 33k times

  7. sql - Convert Datetime column from UTC to local time in select ...

    Nov 7, 2011 · I'm doing a few SQL select queries and would like to convert my UTC datetime column into local time to be displayed as local time in my query results. Note, I am NOT looking to do this …

  8. sql - How to SELECT FROM stored procedure - Stack Overflow

    May 4, 2017 · I have a stored procedure that returns rows: CREATE PROCEDURE MyProc AS BEGIN SELECT * FROM MyTable END My actual procedure is a little more complicated, which is why a …

  9. Converting Select results into Insert script - SQL Server

    I have SQL Server 2008, SQL Server Management Studio. I need to select data from a table in one database and insert into another table in another database. How can I convert the returned results fr...

  10. sql - JOIN two SELECT statement results - Stack Overflow

    Is it possible to join the results of 2 sql SELECT statements in one statement? I have a database of tasks where each record is a separate task, with deadlines (and a PALT, which is just an INT of ...