About 1,810,000 results
Open links in new tab
  1. sql - How to create a View with a With statement ... - Stack Overflow

    Aug 6, 2014 · create view t2 as with t as (select 1 as col) select * from t; Here is a SQL Fiddle showing this example.

  2. Can we pass parameters to a view in SQL? - Stack Overflow

    Apr 7, 2017 · A view is a stored sql text of a select query. Parameters are out of the discussion. When your stored query returns the column where you want to filter with, you can do it in the calling query. …

  3. sql server - Is it possible to create a temporary table in a View and ...

    0 Try creating another SQL view instead of a temporary table and then referencing it in the main SQL view. In other words, a view within a view. You can then drop the first view once you are done …

  4. Create View using Linked Server db in SQL Server

    Sep 20, 2015 · Dragging and dropping from a defined linked server into my view in management studio didn't work - the interface (Management Studio 2008) doesn't allow me to drag and drop.

  5. sql - Create Table from View - Stack Overflow

    Jul 14, 2011 · See this answer will help you. script on this answer get you scripts for generate all tables in database. If you modify last where condition, you can get scripts for create table from views. The …

  6. How to create materialized views in SQL Server?

    Oct 21, 2010 · They're called indexed views in SQL Server - read these white papers for more background: Creating an Indexed View Improving Performance with SQL Server 2008 Indexed …

  7. sql - create view with cursor or loop - Stack Overflow

    Now create a SQL Server Agent job which executes your query. You can either just paste your complete query into the "Command" field, or you can save your query as a stored procedure and just execute …

  8. sql server - TSQL: Create a view that accesses multiple databases ...

    Jan 26, 2010 · CREATE VIEW [dbo].[YourView] as select a.ID, a.SomeInfo, b.SomeOtherInfo from TableInA a join DatabaseB.dbo.TableInB b on -- your join logic goes here Note that this will only …

  9. sql server - Create a view with ORDER BY clause - Stack Overflow

    Mar 4, 2013 · I'm trying to create a view with an ORDER BY clause. I have create it successfully on SQL Server 2012 SP1, but when I try to re-create it on SQL Server 2008 R2, I get this error: Msg 102, …

  10. sql server - How to call Stored Procedure in a View? - Stack Overflow

    May 27, 2009 · 0 You would have to script the View like below. You would essentially write the results of your proc to a table var or temp table, then select into the view. Edit - If you can change your stored …